{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Pixiedust database opened successfully\n",
      "Table VERSION_TRACKER created successfully\n",
      "Table METRICS_TRACKER created successfully\n",
      "\n",
      "Share anonymous install statistics? (opt-out instructions)\n",
      "\n",
      "PixieDust will record metadata on its environment the next time the package is installed or updated. The data is anonymized and aggregated to help plan for future releases, and records only the following values:\n",
      "\n",
      "{\n",
      "   \"data_sent\": currentDate,\n",
      "   \"runtime\": \"python\",\n",
      "   \"application_version\": currentPixiedustVersion,\n",
      "   \"space_id\": nonIdentifyingUniqueId,\n",
      "   \"config\": {\n",
      "       \"repository_id\": \"https://github.com/ibm-watson-data-lab/pixiedust\",\n",
      "       \"target_runtimes\": [\"Data Science Experience\"],\n",
      "       \"event_id\": \"web\",\n",
      "       \"event_organizer\": \"dev-journeys\"\n",
      "   }\n",
      "}\n",
      "You can opt out by calling pixiedust.optOut() in a new cell.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "        <div style=\"margin:10px\">\n",
       "            <a href=\"https://github.com/ibm-watson-data-lab/pixiedust\" target=\"_new\">\n",
       "                <img src=\"https://github.com/ibm-watson-data-lab/pixiedust/raw/master/docs/_static/pd_icon32.png\" style=\"float:left;margin-right:10px\"/>\n",
       "            </a>\n",
       "            <span>Pixiedust version 1.1.18</span>\n",
       "        </div>\n",
       "        "
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[31mPixiedust runtime updated. Please restart kernel\u001b[0m\n",
      "Table SPARK_PACKAGES created successfully\n",
      "Table USER_PREFERENCES created successfully\n",
      "Table service_connections created successfully\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>Warning: You are not running the latest version of PixieDust. Current is 1.1.18, Latest is 1.1.17</div>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "\n",
       "                <div>Please copy and run the following command in a new cell to upgrade: <span style=\"background-color:#ececec;font-family:monospace;padding:0 5px\">!pip install --user --upgrade pixiedust</span></div>\n",
       "            "
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<div>Please restart kernel after upgrading.</div>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#SKIP_COMPARE_OUTPUT\n",
    "import pixiedust"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "data = [(2010, 'Camping Equipment', 3),\n",
    "    (2010, 'Golf Equipment', 1),\n",
    "    (2010, 'Mountaineering Equipment', 1),\n",
    "    (2010, 'Outdoor Protection', 2),\n",
    "    (2010, 'Personal Accessories', 2),\n",
    "    (2011, 'Camping Equipment', 4),\n",
    "    (2011, 'Golf Equipment', 5),\n",
    "    (2011, 'Mountaineering Equipment',2),\n",
    "    (2011, 'Outdoor Protection', 4),\n",
    "    (2011, 'Personal Accessories', 2),\n",
    "    (2012, 'Camping Equipment', 5),\n",
    "    (2012, 'Golf Equipment', 5),\n",
    "    (2012, 'Mountaineering Equipment', 3),\n",
    "    (2012, 'Outdoor Protection', 5),\n",
    "    (2012, 'Personal Accessories', 3),\n",
    "    (2013, 'Camping Equipment', 8),\n",
    "    (2013, 'Golf Equipment', 5),\n",
    "    (2013, 'Mountaineering Equipment', 3),\n",
    "    (2013, 'Outdoor Protection', 8),\n",
    "    (2013, 'Personal Accessories', 4)]\n",
    "\n",
    "columns = [\"year\",\"zone\",\"unique_customers\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "20"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#TARGET=SPARK\n",
    "sqlContext = SQLContext(sc)\n",
    "dd = sqlContext.createDataFrame( data, columns)\n",
    "dd.count()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "#TARGET=PLAIN\n",
    "import pandas\n",
    "dd = pandas.DataFrame( data, columns=columns )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "pixiedust": {
     "displayParams": {
      "aggregation": "SUM",
      "handlerId": "tableView",
      "keyFields": "zone",
      "rendererId": "matplotlib",
      "rowCount": "100",
      "showLegend": "true",
      "stacked": "true",
      "staticFigure": "false",
      "valueFields": "unique_customers"
     }
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style type=\"text/css\">.pd_warning{display:none;}</style><div class=\"pd_warning\"><em>Hey, there's something awesome here! To see it, open this notebook outside GitHub, in a viewer like Jupyter</em></div>\n",
       "        <div class=\"pd_save is-viewer-good\" style=\"padding-right:10px;text-align: center;line-height:initial !important;font-size: xx-large;font-weight: 500;color: coral;\">\n",
       "            \n",
       "        </div>\n",
       "    <div id=\"chartFigureab3ed5a3\" class=\"pd_save is-viewer-good\" style=\"overflow-x:auto\">\n",
       "            <style type=\"text/css\" class=\"pd_save\">\n",
       "    .df-table-wrapper .panel-heading {\n",
       "      border-radius: 0;\n",
       "      padding: 0px;\n",
       "    }\n",
       "    .df-table-wrapper .panel-heading:hover {\n",
       "      border-color: #008571;\n",
       "    }\n",
       "    .df-table-wrapper .panel-title a {\n",
       "      background-color: #f9f9fb;\n",
       "      color: #333333;\n",
       "      display: block;\n",
       "      outline: none;\n",
       "      padding: 10px 15px;\n",
       "      text-decoration: none;\n",
       "    }\n",
       "    .df-table-wrapper .panel-title a:hover {\n",
       "      background-color: #337ab7;\n",
       "      border-color: #2e6da4;\n",
       "      color: #ffffff;\n",
       "      display: block;\n",
       "      padding: 10px 15px;\n",
       "      text-decoration: none;\n",
       "    }\n",
       "    .df-table-wrapper {\n",
       "      font-size: small;\n",
       "      font-weight: 300;\n",
       "      letter-spacing: 0.5px;\n",
       "      line-height: normal;\n",
       "      height: inherit;\n",
       "      overflow: auto;\n",
       "    }\n",
       "    .df-table-search {\n",
       "      margin: 0 0 20px 0;\n",
       "    }\n",
       "    .df-table-search-count {\n",
       "      display: inline-block;\n",
       "      margin: 0 0 20px 0;\n",
       "    }\n",
       "    .df-table-container {\n",
       "      max-height: 50vh;\n",
       "      max-width: 100%;\n",
       "      overflow-x: auto;\n",
       "      position: relative;\n",
       "    }\n",
       "    .df-table-wrapper table {\n",
       "      border: 0 none #ffffff;\n",
       "      border-collapse: collapse;\n",
       "      margin: 0;\n",
       "      min-width: 100%;\n",
       "      padding: 0;\n",
       "      table-layout: fixed;\n",
       "      height: inherit;\n",
       "      overflow: auto;\n",
       "    }\n",
       "    .df-table-wrapper tr.hidden {\n",
       "      display: none;\n",
       "    }\n",
       "    .df-table-wrapper tr:nth-child(even) {\n",
       "      background-color: #f9f9fb;\n",
       "    }\n",
       "    .df-table-wrapper tr.even {\n",
       "      background-color: #f9f9fb;\n",
       "    }\n",
       "    .df-table-wrapper tr.odd {\n",
       "      background-color: #ffffff;\n",
       "    }\n",
       "    .df-table-wrapper td + td {\n",
       "      border-left: 1px solid #e0e0e0;\n",
       "    }\n",
       "  \n",
       "    .df-table-wrapper thead,\n",
       "    .fixed-header {\n",
       "      font-weight: 600;\n",
       "    }\n",
       "    .df-table-wrapper tr,\n",
       "    .fixed-row {\n",
       "      border: 0 none #ffffff;\n",
       "      margin: 0;\n",
       "      padding: 0;\n",
       "    }\n",
       "    .df-table-wrapper th,\n",
       "    .df-table-wrapper td,\n",
       "    .fixed-cell {\n",
       "      border: 0 none #ffffff;\n",
       "      margin: 0;\n",
       "      min-width: 50px;\n",
       "      padding: 5px 20px 5px 10px;\n",
       "      text-align: left;\n",
       "      word-wrap: break-word;\n",
       "    }\n",
       "    .df-table-wrapper th {\n",
       "      padding-bottom: 0;\n",
       "      padding-top: 0;\n",
       "    }\n",
       "    .df-table-wrapper th div {\n",
       "      max-height: 1px;\n",
       "      visibility: hidden;\n",
       "    }\n",
       "  \n",
       "    .df-schema-field {\n",
       "      margin-left: 10px;\n",
       "    }\n",
       "  \n",
       "    .fixed-header-container {\n",
       "      overflow: hidden;\n",
       "      position: relative;\n",
       "    }\n",
       "    .fixed-header {\n",
       "      border-bottom: 2px solid #000;\n",
       "      display: table;\n",
       "      position: relative;\n",
       "    }\n",
       "    .fixed-row {\n",
       "      display: table-row;\n",
       "    }\n",
       "    .fixed-cell {\n",
       "      display: table-cell;\n",
       "    }\n",
       "  </style>\n",
       "  \n",
       "  \n",
       "  \n",
       "  <div class=\"df-table-wrapper df-table-wrapper-ab3ed5a3 panel-group pd_save\">\n",
       "    <!-- dataframe schema -->\n",
       "    \n",
       "    <div class=\"panel panel-default\">\n",
       "      <div class=\"panel-heading\">\n",
       "        <h4 class=\"panel-title\" style=\"margin: 0px;\">\n",
       "          <a data-toggle=\"collapse\" href=\"#df-schema-ab3ed5a3\" data-parent=\"#df-table-wrapper-ab3ed5a3\">Schema</a>\n",
       "        </h4>\n",
       "      </div>\n",
       "      <div id=\"df-schema-ab3ed5a3\" class=\"panel-collapse collapse\">\n",
       "        <div class=\"panel-body\" style=\"font-family: monospace;\">\n",
       "          <div class=\"df-schema-fields\">\n",
       "            <div>Field types:</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>year: </strong> int64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>zone: </strong> object</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>unique_customers: </strong> int64</div>\n",
       "            \n",
       "          </div>\n",
       "        </div>\n",
       "      </div>\n",
       "    </div>\n",
       "    \n",
       "    <!-- dataframe table -->\n",
       "    <div class=\"panel panel-default\">\n",
       "      \n",
       "      <div class=\"panel-heading\">\n",
       "        <h4 class=\"panel-title\" style=\"margin: 0px;\">\n",
       "          <a data-toggle=\"collapse\" href=\"#df-table-ab3ed5a3\" data-parent=\"#df-table-wrapper-ab3ed5a3\"> Table</a>\n",
       "        </h4>\n",
       "      </div>\n",
       "      \n",
       "      <div id=\"df-table-ab3ed5a3\" class=\"panel-collapse collapse in\">\n",
       "        <div class=\"panel-body\">\n",
       "          \n",
       "          <input type=\"text\" class=\"df-table-search form-control input-sm\" placeholder=\"Search table\">\n",
       "          \n",
       "          <div>\n",
       "            \n",
       "            <span class=\"df-table-search-count\">Showing 20 of 20 rows</span>\n",
       "            \n",
       "          </div>\n",
       "          <!-- fixed header for when dataframe table scrolls -->\n",
       "          <div class=\"fixed-header-container\">\n",
       "            <div class=\"fixed-header\">\n",
       "              <div class=\"fixed-row\">\n",
       "                \n",
       "                <div class=\"fixed-cell\">year</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\">zone</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\">unique_customers</div>\n",
       "                \n",
       "              </div>\n",
       "            </div>\n",
       "          </div>\n",
       "          <div class=\"df-table-container\">\n",
       "            <table class=\"df-table\">\n",
       "              <thead>\n",
       "                <tr>\n",
       "                  \n",
       "                  <th><div>year</div></th>\n",
       "                  \n",
       "                  <th><div>zone</div></th>\n",
       "                  \n",
       "                  <th><div>unique_customers</div></th>\n",
       "                  \n",
       "                </tr>\n",
       "              </thead>\n",
       "              <tbody>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>2010</td>\n",
       "                  \n",
       "                  <td>Camping Equipment</td>\n",
       "                  \n",
       "                  <td>3</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>2010</td>\n",
       "                  \n",
       "                  <td>Golf Equipment</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>2010</td>\n",
       "                  \n",
       "                  <td>Mountaineering Equipment</td>\n",
       "                  \n",
       "                  <td>1</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>2010</td>\n",
       "                  \n",
       "                  <td>Outdoor Protection</td>\n",
       "                  \n",
       "                  <td>2</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>2010</td>\n",
       "                  \n",
       "                  <td>Personal Accessories</td>\n",
       "                  \n",
       "                  <td>2</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>2011</td>\n",
       "                  \n",
       "                  <td>Camping Equipment</td>\n",
       "                  \n",
       "                  <td>4</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>2011</td>\n",
       "                  \n",
       "                  <td>Golf Equipment</td>\n",
       "                  \n",
       "                  <td>5</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>2011</td>\n",
       "                  \n",
       "                  <td>Mountaineering Equipment</td>\n",
       "                  \n",
       "                  <td>2</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>2011</td>\n",
       "                  \n",
       "                  <td>Outdoor Protection</td>\n",
       "                  \n",
       "                  <td>4</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>2011</td>\n",
       "                  \n",
       "                  <td>Personal Accessories</td>\n",
       "                  \n",
       "                  <td>2</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>2012</td>\n",
       "                  \n",
       "                  <td>Camping Equipment</td>\n",
       "                  \n",
       "                  <td>5</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>2012</td>\n",
       "                  \n",
       "                  <td>Golf Equipment</td>\n",
       "                  \n",
       "                  <td>5</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>2012</td>\n",
       "                  \n",
       "                  <td>Mountaineering Equipment</td>\n",
       "                  \n",
       "                  <td>3</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>2012</td>\n",
       "                  \n",
       "                  <td>Outdoor Protection</td>\n",
       "                  \n",
       "                  <td>5</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>2012</td>\n",
       "                  \n",
       "                  <td>Personal Accessories</td>\n",
       "                  \n",
       "                  <td>3</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>2013</td>\n",
       "                  \n",
       "                  <td>Camping Equipment</td>\n",
       "                  \n",
       "                  <td>8</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>2013</td>\n",
       "                  \n",
       "                  <td>Golf Equipment</td>\n",
       "                  \n",
       "                  <td>5</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>2013</td>\n",
       "                  \n",
       "                  <td>Mountaineering Equipment</td>\n",
       "                  \n",
       "                  <td>3</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>2013</td>\n",
       "                  \n",
       "                  <td>Outdoor Protection</td>\n",
       "                  \n",
       "                  <td>8</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td>2013</td>\n",
       "                  \n",
       "                  <td>Personal Accessories</td>\n",
       "                  \n",
       "                  <td>4</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "              </tbody>\n",
       "            </table>\n",
       "          </div>\n",
       "        </div>\n",
       "      </div>\n",
       "    </div>\n",
       "  </div>\n",
       "  \n",
       "  <script class=\"pd_save\">\n",
       "    $(function() {\n",
       "      var tableWrapper = $('.df-table-wrapper-ab3ed5a3');\n",
       "      var fixedHeader = $('.fixed-header', tableWrapper);\n",
       "      var tableContainer = $('.df-table-container', tableWrapper);\n",
       "      var table = $('.df-table', tableContainer);\n",
       "      var rows = $('tbody > tr', table);\n",
       "      var total = 20;\n",
       "  \n",
       "      fixedHeader\n",
       "        .css('width', table.width())\n",
       "        .find('.fixed-cell')\n",
       "        .each(function(i, e) {\n",
       "          $(this).css('width', $('.df-table-wrapper-ab3ed5a3 th:nth-child(' + (i+1) + ')').css('width'));\n",
       "        });\n",
       "  \n",
       "      tableContainer.scroll(function() {\n",
       "        fixedHeader.css({ left: table.position().left });\n",
       "      });\n",
       "  \n",
       "      rows.on(\"click\", function(e){\n",
       "          // var txt = e.delegateTarget.innerText;\n",
       "          var splits = $(e.delegateTarget).text().trim().replace(/[\\n\\r]/g, '\\t').split(\"\\t\").map(function(item){return item.trim()}).filter(function(item){return item!=\"\"});\n",
       "          // var splits = txt.split(\"\\t\");\n",
       "          var len = splits.length;\n",
       "          var hdrs = $(fixedHeader).find(\".fixed-cell\");\n",
       "          // Add all cells in the selected row as a map to be consumed by the target as needed\n",
       "          var payload = {type:\"select\", targetDivId: \"\" };\n",
       "          for (var i = 0; i < len; i++) {\n",
       "            payload[hdrs[i].innerHTML] = splits[i];\n",
       "          }\n",
       "  \n",
       "          //simple selection highlighting, client adds \"selected\" class\n",
       "          $(this).addClass(\"selected\").siblings().removeClass(\"selected\");\n",
       "          $(document).trigger('pd_event', payload);\n",
       "      });\n",
       "  \n",
       "      $('.df-table-search', tableWrapper).keyup(function() {\n",
       "        var val = '^(?=.*\\\\b' + $.trim($(this).val()).split(/\\s+/).join('\\\\b)(?=.*\\\\b') + ').*$';\n",
       "        var reg = RegExp(val, 'i');\n",
       "        var index = 0;\n",
       "        \n",
       "        rows.each(function(i, e) {\n",
       "          if (!reg.test($(this).text().replace(/\\s+/g, ' '))) {\n",
       "            $(this).attr('class', 'hidden');\n",
       "          }\n",
       "          else {\n",
       "            $(this).attr('class', (++index % 2 == 0 ? 'even' : 'odd'));\n",
       "          }\n",
       "        });\n",
       "        $('.df-table-search-count', tableWrapper).html('Showing ' + index + ' of ' + total + ' rows');\n",
       "      });\n",
       "    });\n",
       "  \n",
       "    $(\".df-table-wrapper td:contains('http://')\").each(function(){var tc = this.textContent; $(this).wrapInner(\"<a target='_blank' href='\" + tc + \"'></a>\");});\n",
       "    $(\".df-table-wrapper td:contains('https://')\").each(function(){var tc = this.textContent; $(this).wrapInner(\"<a target='_blank' href='\" + tc + \"'></a>\");});\n",
       "  </script>\n",
       "  \n",
       "        </div>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#SKIP_COMPARE_OUTPUT\n",
    "display(dd, no_gen_tests='true')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "<div class=\"row chart-button-group\">\n",
       "    <div class=\"form-group col-sm-9\" style=\"padding-right:10px;\">\n",
       "        \n",
       "        <button pd_app=\"pixiedust.display.chart.options.defaultOptions.DefaultOptions\" \n",
       "            class=\"btn btn-default no_loading_msg\"\n",
       "            pd_options=\"runInDialog=true\"\n",
       "            id=\"option_btn_ae087e77\">\n",
       "            <pd_event_handler pd_source=\"option_btn_ae087e77\" pd_script=\"ShellAccess[eventInfo['entity']].on_ok()\"></pd_event_handler>\n",
       "            Options\n",
       "        </button>\n",
       "        \n",
       "        \n",
       "        \n",
       "        <button pd_app=\"pixiedust.apps.gateway.share.ShareChartApp\" \n",
       "                pd_options=\"runInDialog=true;title=Share Chart\" \n",
       "                class=\"btn btn-default no_loading_msg\">\n",
       "            Share\n",
       "        </button>\n",
       "    </div>\n",
       "    \n",
       "    <div class=\"form-group col-sm-3\">\n",
       "        \n",
       "    </div>\n",
       "    \n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "\n",
       "$(\"#rendererae087e77\").change(function(){\n",
       "    var rendererId = $(this).val();\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTMLae087e77');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTMLae087e77');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"2850507A33444756801B43A74E3E6A56\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#executionae087e77\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#executionae087e77\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#executionae087e77\").length > 0 ){\n",
       "                    $(\"#executionae087e77\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDoneae087e77 != \"undefined\"){\n",
       "                    onDisplayDoneae087e77();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(dd,cell_id='2850507A33444756801B43A74E3E6A56',no_gen_tests='true',showLegend='true',staticFigure='false',aggregation='SUM',rowCount='100',handlerId='pieChart',valueFields='unique_customers',rendererId='matplotlib',stacked='true',keyFields='zone',nostore_cw='1098',nostore_pixiedust='true',nostore_bokeh='false',prefix='ae087e77')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        addOptions({\"rendererId\": rendererId });\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJSae087e77').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()\n",
       "});\n",
       "</script>\n",
       "\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\">\n",
       "        <div class=\"pd_save\" style=\"padding-right:10px;text-align: center;line-height:initial !important;font-size: xx-large;font-weight: 500;color: coral;\">\n",
       "            \n",
       "        </div>\n",
       "    </div>\n",
       "</div>\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\" style=\"padding-right:10px;\">\n",
       "        <div id=\"chartFigureae087e77\" class=\"pd_save\" style=\"overflow-x:auto\">\n",
       "            \n",
       "                    \n",
       "                            <center><img style=\"max-width:initial !important\" src=\"\"  class=\"pd_save\"></center>\n",
       "                        \n",
       "                    \n",
       "                \n",
       "        </div>\n",
       "    </div>\n",
       "    <div class=\"form-group col-sm-2 rendererOpts\">\n",
       "        \n",
       "        <div><strong>Pie Chart Options</strong></div>\n",
       "        \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Chart Size: <span id=\"slidevalchartsizeae087e77\">100</span></label>\n",
       "                    \n",
       "                    <div id=\"sliderchartsizeae087e77\"\n",
       "                        name=\"chartsize\"\n",
       "                        data-min=50\n",
       "                        data-max=100\n",
       "                        data-default=100\n",
       "                        style=\"margin: 0 0.6em;\"></div>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedylabelae087e77\" r=\"f\" type=\"checkbox\" name=\"ylabel\"\n",
       "                                checked>\n",
       "                    <label for=\"optioncheckedylabelae087e77\">Show y label</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedmpld3ae087e77\" r=\"t\" type=\"checkbox\" name=\"mpld3\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedmpld3ae087e77\">D3 Rendering (mpld3)</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedlegendae087e77\" r=\"f\" type=\"checkbox\" name=\"legend\"\n",
       "                                checked>\n",
       "                    <label for=\"optioncheckedlegendae087e77\">Show legend</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "        \n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "\n",
       "$(\"[id^=optionchecked][id$=ae087e77]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).prop('checked').toString();\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigureae087e77\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    } \n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTMLae087e77');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"2850507A33444756801B43A74E3E6A56\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#executionae087e77\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#executionae087e77\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#executionae087e77\").length > 0 ){\n",
       "                    $(\"#executionae087e77\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDoneae087e77 != \"undefined\"){\n",
       "                    onDisplayDoneae087e77();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(dd,cell_id='2850507A33444756801B43A74E3E6A56',no_gen_tests='true',showLegend='true',staticFigure='false',aggregation='SUM',rowCount='100',handlerId='pieChart',valueFields='unique_customers',rendererId='matplotlib',stacked='true',keyFields='zone',nostore_cw='1098',nostore_pixiedust='true',nostore_bokeh='false',prefix='ae087e77')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJSae087e77').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(\"[id^=slider][id$=ae087e77]\").each(function() {\n",
       "    var sliderElt = $(this)\n",
       "    var thisOption = sliderElt.attr('name')\n",
       "    var min = sliderElt.data(\"min\")\n",
       "    var max = sliderElt.data(\"max\")\n",
       "    var val = sliderElt.data(\"default\")\n",
       "    sliderElt.slider({\n",
       "        min: isNaN(min) ? 0 : min,\n",
       "        max: isNaN(max) ? 100 : max,\n",
       "        value: isNaN(val) ? 50 : val,\n",
       "        change: function(evt, ui) {\n",
       "            $(\"[id=slideval\" + thisOption + \"ae087e77]\").text(ui.value);\n",
       "            \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'chartFigureae087e77');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTMLae087e77');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"2850507A33444756801B43A74E3E6A56\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#executionae087e77\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#executionae087e77\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#executionae087e77\").length > 0 ){\n",
       "                    $(\"#executionae087e77\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDoneae087e77 != \"undefined\"){\n",
       "                    onDisplayDoneae087e77();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(dd,cell_id='2850507A33444756801B43A74E3E6A56',no_gen_tests='true',showLegend='true',staticFigure='false',aggregation='SUM',rowCount='100',handlerId='pieChart',valueFields='unique_customers',rendererId='matplotlib',stacked='true',keyFields='zone',nostore_cw='1098',nostore_pixiedust='true',nostore_bokeh='false',prefix='ae087e77')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "                var o = {};\n",
       "                o[thisOption] = ui.value;\n",
       "                o[\"nostore_figureOnly\"] = \"true\";\n",
       "                addOptions(o);\n",
       "            \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJSae087e77').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "        },\n",
       "        slide: function(evt, ui) {\n",
       "            $(\"[id=slideval\" + thisOption + \"ae087e77]\").text(ui.value)\n",
       "        }\n",
       "    });\n",
       "})\n",
       "\n",
       "$(document).ready(function(){ $('[data-toggle=\"pd-tooltip\"]').tooltip(); });\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "display(dd,cell_id='2850507A33444756801B43A74E3E6A56',no_gen_tests='true',showLegend='true',staticFigure='false',aggregation='SUM',rowCount='100',handlerId='pieChart',valueFields='unique_customers',rendererId='matplotlib',stacked='true',keyFields='zone',nostore_cw='1098',nostore_pixiedust='true',nostore_bokeh='false',prefix='ae087e77')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "<div class=\"row chart-button-group\">\n",
       "    <div class=\"form-group col-sm-9\" style=\"padding-right:10px;\">\n",
       "        \n",
       "        <button pd_app=\"pixiedust.display.chart.options.defaultOptions.DefaultOptions\" \n",
       "            class=\"btn btn-default no_loading_msg\"\n",
       "            pd_options=\"runInDialog=true\"\n",
       "            id=\"option_btn_2e7ed979\">\n",
       "            <pd_event_handler pd_source=\"option_btn_2e7ed979\" pd_script=\"ShellAccess[eventInfo['entity']].on_ok()\"></pd_event_handler>\n",
       "            Options\n",
       "        </button>\n",
       "        \n",
       "        \n",
       "        \n",
       "        <button pd_app=\"pixiedust.apps.gateway.share.ShareChartApp\" \n",
       "                pd_options=\"runInDialog=true;title=Share Chart\" \n",
       "                class=\"btn btn-default no_loading_msg\">\n",
       "            Share\n",
       "        </button>\n",
       "    </div>\n",
       "    \n",
       "    <div class=\"form-group col-sm-3\">\n",
       "        \n",
       "        <label class=\"field\">Renderer:</label>\n",
       "        <select class=\"form-control\" id=\"renderer2e7ed979\" style=\"margin:0; display:inline-block; width:70%;\">\n",
       "            \n",
       "                <option value=\"matplotlib\" selected>matplotlib</option>\n",
       "            \n",
       "                <option value=\"bokeh\" >bokeh</option>\n",
       "            \n",
       "        </select>\n",
       "        \n",
       "    </div>\n",
       "    \n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "\n",
       "$(\"#renderer2e7ed979\").change(function(){\n",
       "    var rendererId = $(this).val();\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML2e7ed979');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML2e7ed979');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"2850507A33444756801B43A74E3E6A56\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution2e7ed979\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution2e7ed979\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution2e7ed979\").length > 0 ){\n",
       "                    $(\"#execution2e7ed979\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone2e7ed979 != \"undefined\"){\n",
       "                    onDisplayDone2e7ed979();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(dd,cell_id='2850507A33444756801B43A74E3E6A56',no_gen_tests='true',showLegend='true',staticFigure='false',aggregation='SUM',rowCount='100',handlerId='barChart',valueFields='unique_customers',rendererId='matplotlib',stacked='true',keyFields='zone',nostore_cw='1098',nostore_pixiedust='true',nostore_bokeh='false',prefix='2e7ed979')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        addOptions({\"rendererId\": rendererId });\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS2e7ed979').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()\n",
       "});\n",
       "</script>\n",
       "\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\">\n",
       "        <div class=\"pd_save\" style=\"padding-right:10px;text-align: center;line-height:initial !important;font-size: xx-large;font-weight: 500;color: coral;\">\n",
       "            \n",
       "        </div>\n",
       "    </div>\n",
       "</div>\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\" style=\"padding-right:10px;\">\n",
       "        <div id=\"chartFigure2e7ed979\" class=\"pd_save\" style=\"overflow-x:auto\">\n",
       "            \n",
       "                    \n",
       "                            <center><img style=\"max-width:initial !important\" src=\"\"  class=\"pd_save\"></center>\n",
       "                        \n",
       "                    \n",
       "                \n",
       "        </div>\n",
       "    </div>\n",
       "    <div class=\"form-group col-sm-2 rendererOpts\">\n",
       "        \n",
       "        <div><strong>Bar Chart Options</strong></div>\n",
       "        \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Chart Size: <span id=\"slidevalchartsize2e7ed979\">100</span></label>\n",
       "                    \n",
       "                    <div id=\"sliderchartsize2e7ed979\"\n",
       "                        name=\"chartsize\"\n",
       "                        data-min=50\n",
       "                        data-max=100\n",
       "                        data-default=100\n",
       "                        style=\"margin: 0 0.6em;\"></div>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Cluster By:</label>\n",
       "                    \n",
       "                    <select class=\"form-control\" id=\"optionselectclusterby2e7ed979\" name=\"clusterby\" r=\"t\" style=\"margin-left: 0px;\">\n",
       "                        \n",
       "                            <option value=\"None\" >None</option>\n",
       "                        \n",
       "                            <option value=\"year\" >year</option>\n",
       "                        \n",
       "                    </select>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtimeseries2e7ed979\" r=\"f\" type=\"checkbox\" name=\"timeseries\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtimeseries2e7ed979\">Time Series</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Orientation:</label>\n",
       "                    \n",
       "                    <select class=\"form-control\" id=\"optionselectorientation2e7ed979\" name=\"orientation\" r=\"f\" style=\"margin-left: 0px;\">\n",
       "                        \n",
       "                            <option value=\"vertical\" selected>vertical</option>\n",
       "                        \n",
       "                            <option value=\"horizontal\" >horizontal</option>\n",
       "                        \n",
       "                    </select>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedlegend2e7ed979\" r=\"f\" type=\"checkbox\" name=\"legend\"\n",
       "                                checked>\n",
       "                    <label for=\"optioncheckedlegend2e7ed979\">Show legend</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Sort By:</label>\n",
       "                    \n",
       "                    <select class=\"form-control\" id=\"optionselectsortby2e7ed979\" name=\"sortby\" r=\"f\" style=\"margin-left: 0px;\">\n",
       "                        \n",
       "                            <option value=\"Keys ASC\" selected>Keys ASC</option>\n",
       "                        \n",
       "                            <option value=\"Keys DESC\" >Keys DESC</option>\n",
       "                        \n",
       "                            <option value=\"Values ASC\" >Values ASC</option>\n",
       "                        \n",
       "                            <option value=\"Values DESC\" >Values DESC</option>\n",
       "                        \n",
       "                    </select>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedmpld32e7ed979\" r=\"t\" type=\"checkbox\" name=\"mpld3\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedmpld32e7ed979\">D3 Rendering (mpld3)</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "        \n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "$(\"[id^=optionselect][id$=2e7ed979]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).val();\n",
       "    if (thisValue == \"None\"){\n",
       "        thisValue = null\n",
       "    }\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigure2e7ed979\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    }\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML2e7ed979');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"2850507A33444756801B43A74E3E6A56\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution2e7ed979\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution2e7ed979\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution2e7ed979\").length > 0 ){\n",
       "                    $(\"#execution2e7ed979\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone2e7ed979 != \"undefined\"){\n",
       "                    onDisplayDone2e7ed979();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(dd,cell_id='2850507A33444756801B43A74E3E6A56',no_gen_tests='true',showLegend='true',staticFigure='false',aggregation='SUM',rowCount='100',handlerId='barChart',valueFields='unique_customers',rendererId='matplotlib',stacked='true',keyFields='zone',nostore_cw='1098',nostore_pixiedust='true',nostore_bokeh='false',prefix='2e7ed979')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS2e7ed979').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(\"[id^=optionchecked][id$=2e7ed979]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).prop('checked').toString();\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigure2e7ed979\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    } \n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML2e7ed979');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"2850507A33444756801B43A74E3E6A56\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution2e7ed979\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution2e7ed979\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution2e7ed979\").length > 0 ){\n",
       "                    $(\"#execution2e7ed979\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone2e7ed979 != \"undefined\"){\n",
       "                    onDisplayDone2e7ed979();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(dd,cell_id='2850507A33444756801B43A74E3E6A56',no_gen_tests='true',showLegend='true',staticFigure='false',aggregation='SUM',rowCount='100',handlerId='barChart',valueFields='unique_customers',rendererId='matplotlib',stacked='true',keyFields='zone',nostore_cw='1098',nostore_pixiedust='true',nostore_bokeh='false',prefix='2e7ed979')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS2e7ed979').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(\"[id^=slider][id$=2e7ed979]\").each(function() {\n",
       "    var sliderElt = $(this)\n",
       "    var thisOption = sliderElt.attr('name')\n",
       "    var min = sliderElt.data(\"min\")\n",
       "    var max = sliderElt.data(\"max\")\n",
       "    var val = sliderElt.data(\"default\")\n",
       "    sliderElt.slider({\n",
       "        min: isNaN(min) ? 0 : min,\n",
       "        max: isNaN(max) ? 100 : max,\n",
       "        value: isNaN(val) ? 50 : val,\n",
       "        change: function(evt, ui) {\n",
       "            $(\"[id=slideval\" + thisOption + \"2e7ed979]\").text(ui.value);\n",
       "            \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'chartFigure2e7ed979');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML2e7ed979');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"2850507A33444756801B43A74E3E6A56\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution2e7ed979\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution2e7ed979\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution2e7ed979\").length > 0 ){\n",
       "                    $(\"#execution2e7ed979\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone2e7ed979 != \"undefined\"){\n",
       "                    onDisplayDone2e7ed979();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(dd,cell_id='2850507A33444756801B43A74E3E6A56',no_gen_tests='true',showLegend='true',staticFigure='false',aggregation='SUM',rowCount='100',handlerId='barChart',valueFields='unique_customers',rendererId='matplotlib',stacked='true',keyFields='zone',nostore_cw='1098',nostore_pixiedust='true',nostore_bokeh='false',prefix='2e7ed979')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "                var o = {};\n",
       "                o[thisOption] = ui.value;\n",
       "                o[\"nostore_figureOnly\"] = \"true\";\n",
       "                addOptions(o);\n",
       "            \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS2e7ed979').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "        },\n",
       "        slide: function(evt, ui) {\n",
       "            $(\"[id=slideval\" + thisOption + \"2e7ed979]\").text(ui.value)\n",
       "        }\n",
       "    });\n",
       "})\n",
       "\n",
       "$(document).ready(function(){ $('[data-toggle=\"pd-tooltip\"]').tooltip(); });\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "display(dd,cell_id='2850507A33444756801B43A74E3E6A56',no_gen_tests='true',showLegend='true',staticFigure='false',aggregation='SUM',rowCount='100',handlerId='barChart',valueFields='unique_customers',rendererId='matplotlib',stacked='true',keyFields='zone',nostore_cw='1098',nostore_pixiedust='true',nostore_bokeh='false',prefix='2e7ed979')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas\n",
    "d = {'col1': [None, 2, 1, 7, 1], 'col2': [6, None, 5, 9, 3], 'col3': ['ice cream', 'cookies', None, 'cake', 'pie']}\n",
    "pdf2 = pandas.DataFrame(data=d)\n",
    "pdf2.shape[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "<div class=\"row chart-button-group\">\n",
       "    <div class=\"form-group col-sm-9\" style=\"padding-right:10px;\">\n",
       "        \n",
       "        <button pd_app=\"pixiedust.display.chart.renderers.table.tableOptions.TableOptions\" \n",
       "            class=\"btn btn-default no_loading_msg\"\n",
       "            pd_options=\"runInDialog=true\"\n",
       "            id=\"option_btn_4046ac43\">\n",
       "            <pd_event_handler pd_source=\"option_btn_4046ac43\" pd_script=\"ShellAccess[eventInfo['entity']].on_ok()\"></pd_event_handler>\n",
       "            Options\n",
       "        </button>\n",
       "        \n",
       "        \n",
       "        \n",
       "        <button pd_app=\"pixiedust.apps.gateway.share.ShareChartApp\" \n",
       "                pd_options=\"runInDialog=true;title=Share Chart\" \n",
       "                class=\"btn btn-default no_loading_msg\">\n",
       "            Share\n",
       "        </button>\n",
       "    </div>\n",
       "    \n",
       "    <div class=\"form-group col-sm-3\">\n",
       "        \n",
       "    </div>\n",
       "    \n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "\n",
       "$(\"#renderer4046ac43\").change(function(){\n",
       "    var rendererId = $(this).val();\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML4046ac43');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML4046ac43');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"20499543AE4446FAA9707357577DE951\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution4046ac43\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution4046ac43\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution4046ac43\").length > 0 ){\n",
       "                    $(\"#execution4046ac43\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone4046ac43 != \"undefined\"){\n",
       "                    onDisplayDone4046ac43();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(pdf2,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',table_showrows='All',org_params='nostore_pixiedust',prefix='4046ac43',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        addOptions({\"rendererId\": rendererId });\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS4046ac43').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()\n",
       "});\n",
       "</script>\n",
       "\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\">\n",
       "        <div class=\"pd_save\" style=\"padding-right:10px;text-align: center;line-height:initial !important;font-size: xx-large;font-weight: 500;color: coral;\">\n",
       "            \n",
       "        </div>\n",
       "    </div>\n",
       "</div>\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\" style=\"padding-right:10px;\">\n",
       "        <div id=\"chartFigure4046ac43\" class=\"pd_save\" style=\"overflow-x:auto\">\n",
       "            <style type=\"text/css\" class=\"pd_save\">\n",
       "    .df-table-wrapper .panel-heading {\n",
       "      border-radius: 0;\n",
       "      padding: 0px;\n",
       "    }\n",
       "    .df-table-wrapper .panel-heading:hover {\n",
       "      border-color: #008571;\n",
       "    }\n",
       "    .df-table-wrapper .panel-title a {\n",
       "      background-color: #f9f9fb;\n",
       "      color: #333333;\n",
       "      display: block;\n",
       "      outline: none;\n",
       "      padding: 10px 15px;\n",
       "      text-decoration: none;\n",
       "    }\n",
       "    .df-table-wrapper .panel-title a:hover {\n",
       "      background-color: #337ab7;\n",
       "      border-color: #2e6da4;\n",
       "      color: #ffffff;\n",
       "      display: block;\n",
       "      padding: 10px 15px;\n",
       "      text-decoration: none;\n",
       "    }\n",
       "    .df-table-wrapper {\n",
       "      font-size: small;\n",
       "      font-weight: 300;\n",
       "      letter-spacing: 0.5px;\n",
       "      line-height: normal;\n",
       "      height: inherit;\n",
       "      overflow: auto;\n",
       "    }\n",
       "    .df-table-search {\n",
       "      margin: 0 0 20px 0;\n",
       "    }\n",
       "    .df-table-search-count {\n",
       "      display: inline-block;\n",
       "      margin: 0 0 20px 0;\n",
       "    }\n",
       "    .df-table-container {\n",
       "      max-height: 50vh;\n",
       "      max-width: 100%;\n",
       "      overflow-x: auto;\n",
       "      position: relative;\n",
       "    }\n",
       "    .df-table-wrapper table {\n",
       "      border: 0 none #ffffff;\n",
       "      border-collapse: collapse;\n",
       "      margin: 0;\n",
       "      min-width: 100%;\n",
       "      padding: 0;\n",
       "      table-layout: fixed;\n",
       "      height: inherit;\n",
       "      overflow: auto;\n",
       "    }\n",
       "    .df-table-wrapper tr.hidden {\n",
       "      display: none;\n",
       "    }\n",
       "    .df-table-wrapper tr:nth-child(even) {\n",
       "      background-color: #f9f9fb;\n",
       "    }\n",
       "    .df-table-wrapper tr.even {\n",
       "      background-color: #f9f9fb;\n",
       "    }\n",
       "    .df-table-wrapper tr.odd {\n",
       "      background-color: #ffffff;\n",
       "    }\n",
       "    .df-table-wrapper td + td {\n",
       "      border-left: 1px solid #e0e0e0;\n",
       "    }\n",
       "  \n",
       "    .df-table-wrapper thead,\n",
       "    .fixed-header {\n",
       "      font-weight: 600;\n",
       "    }\n",
       "    .df-table-wrapper tr,\n",
       "    .fixed-row {\n",
       "      border: 0 none #ffffff;\n",
       "      margin: 0;\n",
       "      padding: 0;\n",
       "    }\n",
       "    .df-table-wrapper th,\n",
       "    .df-table-wrapper td,\n",
       "    .fixed-cell {\n",
       "      border: 0 none #ffffff;\n",
       "      margin: 0;\n",
       "      min-width: 50px;\n",
       "      padding: 5px 20px 5px 10px;\n",
       "      text-align: left;\n",
       "      word-wrap: break-word;\n",
       "    }\n",
       "    .df-table-wrapper th {\n",
       "      padding-bottom: 0;\n",
       "      padding-top: 0;\n",
       "    }\n",
       "    .df-table-wrapper th div {\n",
       "      max-height: 1px;\n",
       "      visibility: hidden;\n",
       "    }\n",
       "  \n",
       "    .df-schema-field {\n",
       "      margin-left: 10px;\n",
       "    }\n",
       "  \n",
       "    .fixed-header-container {\n",
       "      overflow: hidden;\n",
       "      position: relative;\n",
       "    }\n",
       "    .fixed-header {\n",
       "      border-bottom: 2px solid #000;\n",
       "      display: table;\n",
       "      position: relative;\n",
       "    }\n",
       "    .fixed-row {\n",
       "      display: table-row;\n",
       "    }\n",
       "    .fixed-cell {\n",
       "      display: table-cell;\n",
       "    }\n",
       "  </style>\n",
       "  \n",
       "  \n",
       "  \n",
       "  <div class=\"df-table-wrapper df-table-wrapper-4046ac43 panel-group pd_save\">\n",
       "    <!-- dataframe schema -->\n",
       "    \n",
       "    <div class=\"panel panel-default\">\n",
       "      <div class=\"panel-heading\">\n",
       "        <h4 class=\"panel-title\" style=\"margin: 0px;\">\n",
       "          <a data-toggle=\"collapse\" href=\"#df-schema-4046ac43\" data-parent=\"#df-table-wrapper-4046ac43\">Schema</a>\n",
       "        </h4>\n",
       "      </div>\n",
       "      <div id=\"df-schema-4046ac43\" class=\"panel-collapse collapse\">\n",
       "        <div class=\"panel-body\" style=\"font-family: monospace;\">\n",
       "          <div class=\"df-schema-fields\">\n",
       "            <div>Field types:</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>col1: </strong> float64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>col2: </strong> float64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>col3: </strong> object</div>\n",
       "            \n",
       "          </div>\n",
       "        </div>\n",
       "      </div>\n",
       "    </div>\n",
       "    \n",
       "    <!-- dataframe table -->\n",
       "    <div class=\"panel panel-default\" >\n",
       "      \n",
       "      <div class=\"panel-heading\">\n",
       "        <h4 class=\"panel-title\" style=\"margin: 0px;\">\n",
       "          <a data-toggle=\"collapse\" href=\"#df-table-4046ac43\" data-parent=\"#df-table-wrapper-4046ac43\"> Table</a>\n",
       "        </h4>\n",
       "      </div>\n",
       "      \n",
       "      <div id=\"df-table-4046ac43\" class=\"panel-collapse collapse in\">\n",
       "        <div class=\"panel-body\">\n",
       "          \n",
       "          <input type=\"text\" class=\"df-table-search form-control input-sm\" placeholder=\"Search table\">\n",
       "          \n",
       "          <div>\n",
       "            \n",
       "            <span class=\"df-table-search-count\">Showing 5 of 5 rows</span>\n",
       "            \n",
       "          </div>\n",
       "          <!-- fixed header for when dataframe table scrolls -->\n",
       "          <div class=\"fixed-header-container\">\n",
       "            <div class=\"fixed-header\">\n",
       "              <div class=\"fixed-row\">\n",
       "                \n",
       "                <div class=\"fixed-cell\" >col1</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\" >col2</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\" >col3</div>\n",
       "                \n",
       "              </div>\n",
       "            </div>\n",
       "          </div>\n",
       "          <div class=\"df-table-container\">\n",
       "            <table class=\"df-table\">\n",
       "              <thead>\n",
       "                <tr>\n",
       "                  \n",
       "                  <th ><div>col1</div></th>\n",
       "                  \n",
       "                  <th ><div>col2</div></th>\n",
       "                  \n",
       "                  <th ><div>col3</div></th>\n",
       "                  \n",
       "                </tr>\n",
       "              </thead>\n",
       "              <tbody>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >nan</td>\n",
       "                  \n",
       "                  <td >6.0</td>\n",
       "                  \n",
       "                  <td >ice cream</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >2.0</td>\n",
       "                  \n",
       "                  <td >nan</td>\n",
       "                  \n",
       "                  <td >cookies</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >1.0</td>\n",
       "                  \n",
       "                  <td >5.0</td>\n",
       "                  \n",
       "                  <td >None</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >7.0</td>\n",
       "                  \n",
       "                  <td >9.0</td>\n",
       "                  \n",
       "                  <td >cake</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >1.0</td>\n",
       "                  \n",
       "                  <td >3.0</td>\n",
       "                  \n",
       "                  <td >pie</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "              </tbody>\n",
       "            </table>\n",
       "          </div>\n",
       "        </div>\n",
       "      </div>\n",
       "    </div>\n",
       "  </div>\n",
       "  \n",
       "  <script class=\"pd_save\">\n",
       "    $(function() {\n",
       "      var tableWrapper = $('.df-table-wrapper-4046ac43');\n",
       "      var fixedHeader = $('.fixed-header', tableWrapper);\n",
       "      var tableContainer = $('.df-table-container', tableWrapper);\n",
       "      var table = $('.df-table', tableContainer);\n",
       "      var rows = $('tbody > tr', table);\n",
       "      var total = 5;\n",
       "  \n",
       "      fixedHeader\n",
       "        .css('width', table.width())\n",
       "        .find('.fixed-cell')\n",
       "        .each(function(i, e) {\n",
       "          $(this).css('width', $('.df-table-wrapper-4046ac43 th:nth-child(' + (i+1) + ')').css('width'));\n",
       "        });\n",
       "  \n",
       "      tableContainer.scroll(function() {\n",
       "        fixedHeader.css({ left: table.position().left });\n",
       "      });\n",
       "  \n",
       "      rows.on(\"click\", function(e){\n",
       "          // var txt = e.delegateTarget.innerText;\n",
       "          var splits = $(e.delegateTarget).text().trim().replace(/[\\n\\r]/g, '\\t').split(\"\\t\").map(function(item){return item.trim()}).filter(function(item){return item!=\"\"});\n",
       "          // var splits = txt.split(\"\\t\");\n",
       "          var len = splits.length;\n",
       "          var hdrs = $(fixedHeader).find(\".fixed-cell\");\n",
       "          // Add all cells in the selected row as a map to be consumed by the target as needed\n",
       "          var payload = {type:\"select\", targetDivId: \"\" };\n",
       "          for (var i = 0; i < len; i++) {\n",
       "            payload[hdrs[i].innerHTML] = splits[i];\n",
       "          }\n",
       "  \n",
       "          //simple selection highlighting, client adds \"selected\" class\n",
       "          $(this).addClass(\"selected\").siblings().removeClass(\"selected\");\n",
       "          $(document).trigger('pd_event', payload);\n",
       "      });\n",
       "  \n",
       "      $('.df-table-search', tableWrapper).keyup(function() {\n",
       "        var val = '^(?=.*\\\\b' + $.trim($(this).val()).split(/\\s+/).join('\\\\b)(?=.*\\\\b') + ').*$';\n",
       "        var reg = RegExp(val, 'i');\n",
       "        var index = 0;\n",
       "        \n",
       "        rows.each(function(i, e) {\n",
       "          if (!reg.test($(this).text().replace(/\\s+/g, ' '))) {\n",
       "            $(this).attr('class', 'hidden');\n",
       "          }\n",
       "          else {\n",
       "            $(this).attr('class', (++index % 2 == 0 ? 'even' : 'odd'));\n",
       "          }\n",
       "        });\n",
       "        $('.df-table-search-count', tableWrapper).html('Showing ' + index + ' of ' + total + ' rows');\n",
       "      });\n",
       "    });\n",
       "  \n",
       "    $(\".df-table-wrapper td:contains('http://')\").each(function(){var tc = this.textContent; $(this).wrapInner(\"<a target='_blank' href='\" + tc + \"'/>\");});\n",
       "    $(\".df-table-wrapper td:contains('https://')\").each(function(){var tc = this.textContent; $(this).wrapInner(\"<a target='_blank' href='\" + tc + \"'/>\");});\n",
       "  </script>\n",
       "  \n",
       "        </div>\n",
       "    </div>\n",
       "    <div class=\"form-group col-sm-2 rendererOpts\">\n",
       "        \n",
       "        <div><strong>Table View Options</strong></div>\n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_noschema4046ac43\" r=\"f\" type=\"checkbox\" name=\"table_noschema\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_noschema4046ac43\">Hide Schema</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_nosearch4046ac43\" r=\"f\" type=\"checkbox\" name=\"table_nosearch\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_nosearch4046ac43\">Hide Search</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_nocount4046ac43\" r=\"f\" type=\"checkbox\" name=\"table_nocount\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_nocount4046ac43\">Hide Row Count</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Show Rows:</label>\n",
       "                    <i class=\"fa fa-info-circle\" style=\"color:orange\" data-toggle=\"pd-tooltip\" title=\"Warning: this filter only applies to the sampled data and not the original data set\"></i>\n",
       "                    <select class=\"form-control\" id=\"optionselecttable_showrows4046ac43\" name=\"table_showrows\" r=\"f\" style=\"margin-left: 0px;\">\n",
       "                        \n",
       "                            <option value=\"All\" selected>All</option>\n",
       "                        \n",
       "                            <option value=\"Missing values\" >Missing values</option>\n",
       "                        \n",
       "                            <option value=\"Not missing values\" >Not missing values</option>\n",
       "                        \n",
       "                    </select>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "        \n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "$(\"[id^=optionselect][id$=4046ac43]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).val();\n",
       "    if (thisValue == \"None\"){\n",
       "        thisValue = null\n",
       "    }\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigure4046ac43\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    }\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML4046ac43');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"20499543AE4446FAA9707357577DE951\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution4046ac43\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution4046ac43\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution4046ac43\").length > 0 ){\n",
       "                    $(\"#execution4046ac43\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone4046ac43 != \"undefined\"){\n",
       "                    onDisplayDone4046ac43();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(pdf2,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',table_showrows='All',org_params='nostore_pixiedust',prefix='4046ac43',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS4046ac43').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(\"[id^=optionchecked][id$=4046ac43]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).prop('checked').toString();\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigure4046ac43\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    } \n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML4046ac43');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"20499543AE4446FAA9707357577DE951\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution4046ac43\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution4046ac43\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution4046ac43\").length > 0 ){\n",
       "                    $(\"#execution4046ac43\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone4046ac43 != \"undefined\"){\n",
       "                    onDisplayDone4046ac43();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(pdf2,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',table_showrows='All',org_params='nostore_pixiedust',prefix='4046ac43',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS4046ac43').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(document).ready(function(){ $('[data-toggle=\"pd-tooltip\"]').tooltip(); });\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "display(pdf2,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',table_showrows='All',org_params='nostore_pixiedust',prefix='4046ac43',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "<div class=\"row chart-button-group\">\n",
       "    <div class=\"form-group col-sm-9\" style=\"padding-right:10px;\">\n",
       "        \n",
       "        <button pd_app=\"pixiedust.display.chart.renderers.table.tableOptions.TableOptions\" \n",
       "            class=\"btn btn-default no_loading_msg\"\n",
       "            pd_options=\"runInDialog=true\"\n",
       "            id=\"option_btn_446b0b5f\">\n",
       "            <pd_event_handler pd_source=\"option_btn_446b0b5f\" pd_script=\"ShellAccess[eventInfo['entity']].on_ok()\"></pd_event_handler>\n",
       "            Options\n",
       "        </button>\n",
       "        \n",
       "        \n",
       "        \n",
       "        <button pd_app=\"pixiedust.apps.gateway.share.ShareChartApp\" \n",
       "                pd_options=\"runInDialog=true;title=Share Chart\" \n",
       "                class=\"btn btn-default no_loading_msg\">\n",
       "            Share\n",
       "        </button>\n",
       "    </div>\n",
       "    \n",
       "    <div class=\"form-group col-sm-3\">\n",
       "        \n",
       "    </div>\n",
       "    \n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "\n",
       "$(\"#renderer446b0b5f\").change(function(){\n",
       "    var rendererId = $(this).val();\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML446b0b5f');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML446b0b5f');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"20499543AE4446FAA9707357577DE951\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution446b0b5f\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution446b0b5f\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution446b0b5f\").length > 0 ){\n",
       "                    $(\"#execution446b0b5f\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone446b0b5f != \"undefined\"){\n",
       "                    onDisplayDone446b0b5f();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(pdf2,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',table_showrows='Missing values',org_params='nostore_pixiedust',prefix='446b0b5f',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        addOptions({\"rendererId\": rendererId });\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS446b0b5f').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()\n",
       "});\n",
       "</script>\n",
       "\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\">\n",
       "        <div class=\"pd_save\" style=\"padding-right:10px;text-align: center;line-height:initial !important;font-size: xx-large;font-weight: 500;color: coral;\">\n",
       "            \n",
       "        </div>\n",
       "    </div>\n",
       "</div>\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\" style=\"padding-right:10px;\">\n",
       "        <div id=\"chartFigure446b0b5f\" class=\"pd_save\" style=\"overflow-x:auto\">\n",
       "            <style type=\"text/css\" class=\"pd_save\">\n",
       "    .df-table-wrapper .panel-heading {\n",
       "      border-radius: 0;\n",
       "      padding: 0px;\n",
       "    }\n",
       "    .df-table-wrapper .panel-heading:hover {\n",
       "      border-color: #008571;\n",
       "    }\n",
       "    .df-table-wrapper .panel-title a {\n",
       "      background-color: #f9f9fb;\n",
       "      color: #333333;\n",
       "      display: block;\n",
       "      outline: none;\n",
       "      padding: 10px 15px;\n",
       "      text-decoration: none;\n",
       "    }\n",
       "    .df-table-wrapper .panel-title a:hover {\n",
       "      background-color: #337ab7;\n",
       "      border-color: #2e6da4;\n",
       "      color: #ffffff;\n",
       "      display: block;\n",
       "      padding: 10px 15px;\n",
       "      text-decoration: none;\n",
       "    }\n",
       "    .df-table-wrapper {\n",
       "      font-size: small;\n",
       "      font-weight: 300;\n",
       "      letter-spacing: 0.5px;\n",
       "      line-height: normal;\n",
       "      height: inherit;\n",
       "      overflow: auto;\n",
       "    }\n",
       "    .df-table-search {\n",
       "      margin: 0 0 20px 0;\n",
       "    }\n",
       "    .df-table-search-count {\n",
       "      display: inline-block;\n",
       "      margin: 0 0 20px 0;\n",
       "    }\n",
       "    .df-table-container {\n",
       "      max-height: 50vh;\n",
       "      max-width: 100%;\n",
       "      overflow-x: auto;\n",
       "      position: relative;\n",
       "    }\n",
       "    .df-table-wrapper table {\n",
       "      border: 0 none #ffffff;\n",
       "      border-collapse: collapse;\n",
       "      margin: 0;\n",
       "      min-width: 100%;\n",
       "      padding: 0;\n",
       "      table-layout: fixed;\n",
       "      height: inherit;\n",
       "      overflow: auto;\n",
       "    }\n",
       "    .df-table-wrapper tr.hidden {\n",
       "      display: none;\n",
       "    }\n",
       "    .df-table-wrapper tr:nth-child(even) {\n",
       "      background-color: #f9f9fb;\n",
       "    }\n",
       "    .df-table-wrapper tr.even {\n",
       "      background-color: #f9f9fb;\n",
       "    }\n",
       "    .df-table-wrapper tr.odd {\n",
       "      background-color: #ffffff;\n",
       "    }\n",
       "    .df-table-wrapper td + td {\n",
       "      border-left: 1px solid #e0e0e0;\n",
       "    }\n",
       "  \n",
       "    .df-table-wrapper thead,\n",
       "    .fixed-header {\n",
       "      font-weight: 600;\n",
       "    }\n",
       "    .df-table-wrapper tr,\n",
       "    .fixed-row {\n",
       "      border: 0 none #ffffff;\n",
       "      margin: 0;\n",
       "      padding: 0;\n",
       "    }\n",
       "    .df-table-wrapper th,\n",
       "    .df-table-wrapper td,\n",
       "    .fixed-cell {\n",
       "      border: 0 none #ffffff;\n",
       "      margin: 0;\n",
       "      min-width: 50px;\n",
       "      padding: 5px 20px 5px 10px;\n",
       "      text-align: left;\n",
       "      word-wrap: break-word;\n",
       "    }\n",
       "    .df-table-wrapper th {\n",
       "      padding-bottom: 0;\n",
       "      padding-top: 0;\n",
       "    }\n",
       "    .df-table-wrapper th div {\n",
       "      max-height: 1px;\n",
       "      visibility: hidden;\n",
       "    }\n",
       "  \n",
       "    .df-schema-field {\n",
       "      margin-left: 10px;\n",
       "    }\n",
       "  \n",
       "    .fixed-header-container {\n",
       "      overflow: hidden;\n",
       "      position: relative;\n",
       "    }\n",
       "    .fixed-header {\n",
       "      border-bottom: 2px solid #000;\n",
       "      display: table;\n",
       "      position: relative;\n",
       "    }\n",
       "    .fixed-row {\n",
       "      display: table-row;\n",
       "    }\n",
       "    .fixed-cell {\n",
       "      display: table-cell;\n",
       "    }\n",
       "  </style>\n",
       "  \n",
       "  \n",
       "  \n",
       "  <div class=\"df-table-wrapper df-table-wrapper-446b0b5f panel-group pd_save\">\n",
       "    <!-- dataframe schema -->\n",
       "    \n",
       "    <div class=\"panel panel-default\">\n",
       "      <div class=\"panel-heading\">\n",
       "        <h4 class=\"panel-title\" style=\"margin: 0px;\">\n",
       "          <a data-toggle=\"collapse\" href=\"#df-schema-446b0b5f\" data-parent=\"#df-table-wrapper-446b0b5f\">Schema</a>\n",
       "        </h4>\n",
       "      </div>\n",
       "      <div id=\"df-schema-446b0b5f\" class=\"panel-collapse collapse\">\n",
       "        <div class=\"panel-body\" style=\"font-family: monospace;\">\n",
       "          <div class=\"df-schema-fields\">\n",
       "            <div>Field types:</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>col1: </strong> float64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>col2: </strong> float64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>col3: </strong> object</div>\n",
       "            \n",
       "          </div>\n",
       "        </div>\n",
       "      </div>\n",
       "    </div>\n",
       "    \n",
       "    <!-- dataframe table -->\n",
       "    <div class=\"panel panel-default\" >\n",
       "      \n",
       "      <div class=\"panel-heading\">\n",
       "        <h4 class=\"panel-title\" style=\"margin: 0px;\">\n",
       "          <a data-toggle=\"collapse\" href=\"#df-table-446b0b5f\" data-parent=\"#df-table-wrapper-446b0b5f\"> Table</a>\n",
       "        </h4>\n",
       "      </div>\n",
       "      \n",
       "      <div id=\"df-table-446b0b5f\" class=\"panel-collapse collapse in\">\n",
       "        <div class=\"panel-body\">\n",
       "          \n",
       "          <input type=\"text\" class=\"df-table-search form-control input-sm\" placeholder=\"Search table\">\n",
       "          \n",
       "          <div>\n",
       "            \n",
       "            <span class=\"df-table-search-count\">Showing 3 of 5 rows</span>\n",
       "            \n",
       "          </div>\n",
       "          <!-- fixed header for when dataframe table scrolls -->\n",
       "          <div class=\"fixed-header-container\">\n",
       "            <div class=\"fixed-header\">\n",
       "              <div class=\"fixed-row\">\n",
       "                \n",
       "                <div class=\"fixed-cell\" >col1</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\" >col2</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\" >col3</div>\n",
       "                \n",
       "              </div>\n",
       "            </div>\n",
       "          </div>\n",
       "          <div class=\"df-table-container\">\n",
       "            <table class=\"df-table\">\n",
       "              <thead>\n",
       "                <tr>\n",
       "                  \n",
       "                  <th ><div>col1</div></th>\n",
       "                  \n",
       "                  <th ><div>col2</div></th>\n",
       "                  \n",
       "                  <th ><div>col3</div></th>\n",
       "                  \n",
       "                </tr>\n",
       "              </thead>\n",
       "              <tbody>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >nan</td>\n",
       "                  \n",
       "                  <td >6.0</td>\n",
       "                  \n",
       "                  <td >ice cream</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >2.0</td>\n",
       "                  \n",
       "                  <td >nan</td>\n",
       "                  \n",
       "                  <td >cookies</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >1.0</td>\n",
       "                  \n",
       "                  <td >5.0</td>\n",
       "                  \n",
       "                  <td >None</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "              </tbody>\n",
       "            </table>\n",
       "          </div>\n",
       "        </div>\n",
       "      </div>\n",
       "    </div>\n",
       "  </div>\n",
       "  \n",
       "  <script class=\"pd_save\">\n",
       "    $(function() {\n",
       "      var tableWrapper = $('.df-table-wrapper-446b0b5f');\n",
       "      var fixedHeader = $('.fixed-header', tableWrapper);\n",
       "      var tableContainer = $('.df-table-container', tableWrapper);\n",
       "      var table = $('.df-table', tableContainer);\n",
       "      var rows = $('tbody > tr', table);\n",
       "      var total = 3;\n",
       "  \n",
       "      fixedHeader\n",
       "        .css('width', table.width())\n",
       "        .find('.fixed-cell')\n",
       "        .each(function(i, e) {\n",
       "          $(this).css('width', $('.df-table-wrapper-446b0b5f th:nth-child(' + (i+1) + ')').css('width'));\n",
       "        });\n",
       "  \n",
       "      tableContainer.scroll(function() {\n",
       "        fixedHeader.css({ left: table.position().left });\n",
       "      });\n",
       "  \n",
       "      rows.on(\"click\", function(e){\n",
       "          // var txt = e.delegateTarget.innerText;\n",
       "          var splits = $(e.delegateTarget).text().trim().replace(/[\\n\\r]/g, '\\t').split(\"\\t\").map(function(item){return item.trim()}).filter(function(item){return item!=\"\"});\n",
       "          // var splits = txt.split(\"\\t\");\n",
       "          var len = splits.length;\n",
       "          var hdrs = $(fixedHeader).find(\".fixed-cell\");\n",
       "          // Add all cells in the selected row as a map to be consumed by the target as needed\n",
       "          var payload = {type:\"select\", targetDivId: \"\" };\n",
       "          for (var i = 0; i < len; i++) {\n",
       "            payload[hdrs[i].innerHTML] = splits[i];\n",
       "          }\n",
       "  \n",
       "          //simple selection highlighting, client adds \"selected\" class\n",
       "          $(this).addClass(\"selected\").siblings().removeClass(\"selected\");\n",
       "          $(document).trigger('pd_event', payload);\n",
       "      });\n",
       "  \n",
       "      $('.df-table-search', tableWrapper).keyup(function() {\n",
       "        var val = '^(?=.*\\\\b' + $.trim($(this).val()).split(/\\s+/).join('\\\\b)(?=.*\\\\b') + ').*$';\n",
       "        var reg = RegExp(val, 'i');\n",
       "        var index = 0;\n",
       "        \n",
       "        rows.each(function(i, e) {\n",
       "          if (!reg.test($(this).text().replace(/\\s+/g, ' '))) {\n",
       "            $(this).attr('class', 'hidden');\n",
       "          }\n",
       "          else {\n",
       "            $(this).attr('class', (++index % 2 == 0 ? 'even' : 'odd'));\n",
       "          }\n",
       "        });\n",
       "        $('.df-table-search-count', tableWrapper).html('Showing ' + index + ' of ' + total + ' rows');\n",
       "      });\n",
       "    });\n",
       "  \n",
       "    $(\".df-table-wrapper td:contains('http://')\").each(function(){var tc = this.textContent; $(this).wrapInner(\"<a target='_blank' href='\" + tc + \"'/>\");});\n",
       "    $(\".df-table-wrapper td:contains('https://')\").each(function(){var tc = this.textContent; $(this).wrapInner(\"<a target='_blank' href='\" + tc + \"'/>\");});\n",
       "  </script>\n",
       "  \n",
       "        </div>\n",
       "    </div>\n",
       "    <div class=\"form-group col-sm-2 rendererOpts\">\n",
       "        \n",
       "        <div><strong>Table View Options</strong></div>\n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_noschema446b0b5f\" r=\"f\" type=\"checkbox\" name=\"table_noschema\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_noschema446b0b5f\">Hide Schema</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_nosearch446b0b5f\" r=\"f\" type=\"checkbox\" name=\"table_nosearch\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_nosearch446b0b5f\">Hide Search</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_nocount446b0b5f\" r=\"f\" type=\"checkbox\" name=\"table_nocount\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_nocount446b0b5f\">Hide Row Count</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Show Rows:</label>\n",
       "                    <i class=\"fa fa-info-circle\" style=\"color:orange\" data-toggle=\"pd-tooltip\" title=\"Warning: this filter only applies to the sampled data and not the original data set\"></i>\n",
       "                    <select class=\"form-control\" id=\"optionselecttable_showrows446b0b5f\" name=\"table_showrows\" r=\"f\" style=\"margin-left: 0px;\">\n",
       "                        \n",
       "                            <option value=\"All\" selected>All</option>\n",
       "                        \n",
       "                            <option value=\"Missing values\" selected>Missing values</option>\n",
       "                        \n",
       "                            <option value=\"Not missing values\" >Not missing values</option>\n",
       "                        \n",
       "                    </select>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "        \n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "$(\"[id^=optionselect][id$=446b0b5f]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).val();\n",
       "    if (thisValue == \"None\"){\n",
       "        thisValue = null\n",
       "    }\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigure446b0b5f\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    }\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML446b0b5f');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"20499543AE4446FAA9707357577DE951\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution446b0b5f\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution446b0b5f\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution446b0b5f\").length > 0 ){\n",
       "                    $(\"#execution446b0b5f\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone446b0b5f != \"undefined\"){\n",
       "                    onDisplayDone446b0b5f();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(pdf2,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',table_showrows='Missing values',org_params='nostore_pixiedust',prefix='446b0b5f',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS446b0b5f').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(\"[id^=optionchecked][id$=446b0b5f]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).prop('checked').toString();\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigure446b0b5f\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    } \n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML446b0b5f');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"20499543AE4446FAA9707357577DE951\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution446b0b5f\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution446b0b5f\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution446b0b5f\").length > 0 ){\n",
       "                    $(\"#execution446b0b5f\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone446b0b5f != \"undefined\"){\n",
       "                    onDisplayDone446b0b5f();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(pdf2,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',table_showrows='Missing values',org_params='nostore_pixiedust',prefix='446b0b5f',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS446b0b5f').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(document).ready(function(){ $('[data-toggle=\"pd-tooltip\"]').tooltip(); });\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "display(pdf2,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',table_showrows='Missing values',org_params='nostore_pixiedust',prefix='446b0b5f',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "<div class=\"row chart-button-group\">\n",
       "    <div class=\"form-group col-sm-9\" style=\"padding-right:10px;\">\n",
       "        \n",
       "        <button pd_app=\"pixiedust.display.chart.renderers.table.tableOptions.TableOptions\" \n",
       "            class=\"btn btn-default no_loading_msg\"\n",
       "            pd_options=\"runInDialog=true\"\n",
       "            id=\"option_btn_0923d868\">\n",
       "            <pd_event_handler pd_source=\"option_btn_0923d868\" pd_script=\"ShellAccess[eventInfo['entity']].on_ok()\"></pd_event_handler>\n",
       "            Options\n",
       "        </button>\n",
       "        \n",
       "        \n",
       "        \n",
       "        <button pd_app=\"pixiedust.apps.gateway.share.ShareChartApp\" \n",
       "                pd_options=\"runInDialog=true;title=Share Chart\" \n",
       "                class=\"btn btn-default no_loading_msg\">\n",
       "            Share\n",
       "        </button>\n",
       "    </div>\n",
       "    \n",
       "    <div class=\"form-group col-sm-3\">\n",
       "        \n",
       "    </div>\n",
       "    \n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "\n",
       "$(\"#renderer0923d868\").change(function(){\n",
       "    var rendererId = $(this).val();\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML0923d868');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML0923d868');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"20499543AE4446FAA9707357577DE951\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution0923d868\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution0923d868\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution0923d868\").length > 0 ){\n",
       "                    $(\"#execution0923d868\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone0923d868 != \"undefined\"){\n",
       "                    onDisplayDone0923d868();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(pdf2,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',table_showrows='Not missing values',org_params='nostore_pixiedust',prefix='0923d868',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        addOptions({\"rendererId\": rendererId });\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS0923d868').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()\n",
       "});\n",
       "</script>\n",
       "\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\">\n",
       "        <div class=\"pd_save\" style=\"padding-right:10px;text-align: center;line-height:initial !important;font-size: xx-large;font-weight: 500;color: coral;\">\n",
       "            \n",
       "        </div>\n",
       "    </div>\n",
       "</div>\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\" style=\"padding-right:10px;\">\n",
       "        <div id=\"chartFigure0923d868\" class=\"pd_save\" style=\"overflow-x:auto\">\n",
       "            <style type=\"text/css\" class=\"pd_save\">\n",
       "    .df-table-wrapper .panel-heading {\n",
       "      border-radius: 0;\n",
       "      padding: 0px;\n",
       "    }\n",
       "    .df-table-wrapper .panel-heading:hover {\n",
       "      border-color: #008571;\n",
       "    }\n",
       "    .df-table-wrapper .panel-title a {\n",
       "      background-color: #f9f9fb;\n",
       "      color: #333333;\n",
       "      display: block;\n",
       "      outline: none;\n",
       "      padding: 10px 15px;\n",
       "      text-decoration: none;\n",
       "    }\n",
       "    .df-table-wrapper .panel-title a:hover {\n",
       "      background-color: #337ab7;\n",
       "      border-color: #2e6da4;\n",
       "      color: #ffffff;\n",
       "      display: block;\n",
       "      padding: 10px 15px;\n",
       "      text-decoration: none;\n",
       "    }\n",
       "    .df-table-wrapper {\n",
       "      font-size: small;\n",
       "      font-weight: 300;\n",
       "      letter-spacing: 0.5px;\n",
       "      line-height: normal;\n",
       "      height: inherit;\n",
       "      overflow: auto;\n",
       "    }\n",
       "    .df-table-search {\n",
       "      margin: 0 0 20px 0;\n",
       "    }\n",
       "    .df-table-search-count {\n",
       "      display: inline-block;\n",
       "      margin: 0 0 20px 0;\n",
       "    }\n",
       "    .df-table-container {\n",
       "      max-height: 50vh;\n",
       "      max-width: 100%;\n",
       "      overflow-x: auto;\n",
       "      position: relative;\n",
       "    }\n",
       "    .df-table-wrapper table {\n",
       "      border: 0 none #ffffff;\n",
       "      border-collapse: collapse;\n",
       "      margin: 0;\n",
       "      min-width: 100%;\n",
       "      padding: 0;\n",
       "      table-layout: fixed;\n",
       "      height: inherit;\n",
       "      overflow: auto;\n",
       "    }\n",
       "    .df-table-wrapper tr.hidden {\n",
       "      display: none;\n",
       "    }\n",
       "    .df-table-wrapper tr:nth-child(even) {\n",
       "      background-color: #f9f9fb;\n",
       "    }\n",
       "    .df-table-wrapper tr.even {\n",
       "      background-color: #f9f9fb;\n",
       "    }\n",
       "    .df-table-wrapper tr.odd {\n",
       "      background-color: #ffffff;\n",
       "    }\n",
       "    .df-table-wrapper td + td {\n",
       "      border-left: 1px solid #e0e0e0;\n",
       "    }\n",
       "  \n",
       "    .df-table-wrapper thead,\n",
       "    .fixed-header {\n",
       "      font-weight: 600;\n",
       "    }\n",
       "    .df-table-wrapper tr,\n",
       "    .fixed-row {\n",
       "      border: 0 none #ffffff;\n",
       "      margin: 0;\n",
       "      padding: 0;\n",
       "    }\n",
       "    .df-table-wrapper th,\n",
       "    .df-table-wrapper td,\n",
       "    .fixed-cell {\n",
       "      border: 0 none #ffffff;\n",
       "      margin: 0;\n",
       "      min-width: 50px;\n",
       "      padding: 5px 20px 5px 10px;\n",
       "      text-align: left;\n",
       "      word-wrap: break-word;\n",
       "    }\n",
       "    .df-table-wrapper th {\n",
       "      padding-bottom: 0;\n",
       "      padding-top: 0;\n",
       "    }\n",
       "    .df-table-wrapper th div {\n",
       "      max-height: 1px;\n",
       "      visibility: hidden;\n",
       "    }\n",
       "  \n",
       "    .df-schema-field {\n",
       "      margin-left: 10px;\n",
       "    }\n",
       "  \n",
       "    .fixed-header-container {\n",
       "      overflow: hidden;\n",
       "      position: relative;\n",
       "    }\n",
       "    .fixed-header {\n",
       "      border-bottom: 2px solid #000;\n",
       "      display: table;\n",
       "      position: relative;\n",
       "    }\n",
       "    .fixed-row {\n",
       "      display: table-row;\n",
       "    }\n",
       "    .fixed-cell {\n",
       "      display: table-cell;\n",
       "    }\n",
       "  </style>\n",
       "  \n",
       "  \n",
       "  \n",
       "  <div class=\"df-table-wrapper df-table-wrapper-0923d868 panel-group pd_save\">\n",
       "    <!-- dataframe schema -->\n",
       "    \n",
       "    <div class=\"panel panel-default\">\n",
       "      <div class=\"panel-heading\">\n",
       "        <h4 class=\"panel-title\" style=\"margin: 0px;\">\n",
       "          <a data-toggle=\"collapse\" href=\"#df-schema-0923d868\" data-parent=\"#df-table-wrapper-0923d868\">Schema</a>\n",
       "        </h4>\n",
       "      </div>\n",
       "      <div id=\"df-schema-0923d868\" class=\"panel-collapse collapse\">\n",
       "        <div class=\"panel-body\" style=\"font-family: monospace;\">\n",
       "          <div class=\"df-schema-fields\">\n",
       "            <div>Field types:</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>col1: </strong> float64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>col2: </strong> float64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>col3: </strong> object</div>\n",
       "            \n",
       "          </div>\n",
       "        </div>\n",
       "      </div>\n",
       "    </div>\n",
       "    \n",
       "    <!-- dataframe table -->\n",
       "    <div class=\"panel panel-default\" >\n",
       "      \n",
       "      <div class=\"panel-heading\">\n",
       "        <h4 class=\"panel-title\" style=\"margin: 0px;\">\n",
       "          <a data-toggle=\"collapse\" href=\"#df-table-0923d868\" data-parent=\"#df-table-wrapper-0923d868\"> Table</a>\n",
       "        </h4>\n",
       "      </div>\n",
       "      \n",
       "      <div id=\"df-table-0923d868\" class=\"panel-collapse collapse in\">\n",
       "        <div class=\"panel-body\">\n",
       "          \n",
       "          <input type=\"text\" class=\"df-table-search form-control input-sm\" placeholder=\"Search table\">\n",
       "          \n",
       "          <div>\n",
       "            \n",
       "            <span class=\"df-table-search-count\">Showing 2 of 5 rows</span>\n",
       "            \n",
       "          </div>\n",
       "          <!-- fixed header for when dataframe table scrolls -->\n",
       "          <div class=\"fixed-header-container\">\n",
       "            <div class=\"fixed-header\">\n",
       "              <div class=\"fixed-row\">\n",
       "                \n",
       "                <div class=\"fixed-cell\" >col1</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\" >col2</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\" >col3</div>\n",
       "                \n",
       "              </div>\n",
       "            </div>\n",
       "          </div>\n",
       "          <div class=\"df-table-container\">\n",
       "            <table class=\"df-table\">\n",
       "              <thead>\n",
       "                <tr>\n",
       "                  \n",
       "                  <th ><div>col1</div></th>\n",
       "                  \n",
       "                  <th ><div>col2</div></th>\n",
       "                  \n",
       "                  <th ><div>col3</div></th>\n",
       "                  \n",
       "                </tr>\n",
       "              </thead>\n",
       "              <tbody>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >7.0</td>\n",
       "                  \n",
       "                  <td >9.0</td>\n",
       "                  \n",
       "                  <td >cake</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >1.0</td>\n",
       "                  \n",
       "                  <td >3.0</td>\n",
       "                  \n",
       "                  <td >pie</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "              </tbody>\n",
       "            </table>\n",
       "          </div>\n",
       "        </div>\n",
       "      </div>\n",
       "    </div>\n",
       "  </div>\n",
       "  \n",
       "  <script class=\"pd_save\">\n",
       "    $(function() {\n",
       "      var tableWrapper = $('.df-table-wrapper-0923d868');\n",
       "      var fixedHeader = $('.fixed-header', tableWrapper);\n",
       "      var tableContainer = $('.df-table-container', tableWrapper);\n",
       "      var table = $('.df-table', tableContainer);\n",
       "      var rows = $('tbody > tr', table);\n",
       "      var total = 2;\n",
       "  \n",
       "      fixedHeader\n",
       "        .css('width', table.width())\n",
       "        .find('.fixed-cell')\n",
       "        .each(function(i, e) {\n",
       "          $(this).css('width', $('.df-table-wrapper-0923d868 th:nth-child(' + (i+1) + ')').css('width'));\n",
       "        });\n",
       "  \n",
       "      tableContainer.scroll(function() {\n",
       "        fixedHeader.css({ left: table.position().left });\n",
       "      });\n",
       "  \n",
       "      rows.on(\"click\", function(e){\n",
       "          // var txt = e.delegateTarget.innerText;\n",
       "          var splits = $(e.delegateTarget).text().trim().replace(/[\\n\\r]/g, '\\t').split(\"\\t\").map(function(item){return item.trim()}).filter(function(item){return item!=\"\"});\n",
       "          // var splits = txt.split(\"\\t\");\n",
       "          var len = splits.length;\n",
       "          var hdrs = $(fixedHeader).find(\".fixed-cell\");\n",
       "          // Add all cells in the selected row as a map to be consumed by the target as needed\n",
       "          var payload = {type:\"select\", targetDivId: \"\" };\n",
       "          for (var i = 0; i < len; i++) {\n",
       "            payload[hdrs[i].innerHTML] = splits[i];\n",
       "          }\n",
       "  \n",
       "          //simple selection highlighting, client adds \"selected\" class\n",
       "          $(this).addClass(\"selected\").siblings().removeClass(\"selected\");\n",
       "          $(document).trigger('pd_event', payload);\n",
       "      });\n",
       "  \n",
       "      $('.df-table-search', tableWrapper).keyup(function() {\n",
       "        var val = '^(?=.*\\\\b' + $.trim($(this).val()).split(/\\s+/).join('\\\\b)(?=.*\\\\b') + ').*$';\n",
       "        var reg = RegExp(val, 'i');\n",
       "        var index = 0;\n",
       "        \n",
       "        rows.each(function(i, e) {\n",
       "          if (!reg.test($(this).text().replace(/\\s+/g, ' '))) {\n",
       "            $(this).attr('class', 'hidden');\n",
       "          }\n",
       "          else {\n",
       "            $(this).attr('class', (++index % 2 == 0 ? 'even' : 'odd'));\n",
       "          }\n",
       "        });\n",
       "        $('.df-table-search-count', tableWrapper).html('Showing ' + index + ' of ' + total + ' rows');\n",
       "      });\n",
       "    });\n",
       "  \n",
       "    $(\".df-table-wrapper td:contains('http://')\").each(function(){var tc = this.textContent; $(this).wrapInner(\"<a target='_blank' href='\" + tc + \"'/>\");});\n",
       "    $(\".df-table-wrapper td:contains('https://')\").each(function(){var tc = this.textContent; $(this).wrapInner(\"<a target='_blank' href='\" + tc + \"'/>\");});\n",
       "  </script>\n",
       "  \n",
       "        </div>\n",
       "    </div>\n",
       "    <div class=\"form-group col-sm-2 rendererOpts\">\n",
       "        \n",
       "        <div><strong>Table View Options</strong></div>\n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_noschema0923d868\" r=\"f\" type=\"checkbox\" name=\"table_noschema\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_noschema0923d868\">Hide Schema</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_nosearch0923d868\" r=\"f\" type=\"checkbox\" name=\"table_nosearch\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_nosearch0923d868\">Hide Search</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_nocount0923d868\" r=\"f\" type=\"checkbox\" name=\"table_nocount\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_nocount0923d868\">Hide Row Count</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Show Rows:</label>\n",
       "                    <i class=\"fa fa-info-circle\" style=\"color:orange\" data-toggle=\"pd-tooltip\" title=\"Warning: this filter only applies to the sampled data and not the original data set\"></i>\n",
       "                    <select class=\"form-control\" id=\"optionselecttable_showrows0923d868\" name=\"table_showrows\" r=\"f\" style=\"margin-left: 0px;\">\n",
       "                        \n",
       "                            <option value=\"All\" selected>All</option>\n",
       "                        \n",
       "                            <option value=\"Missing values\" >Missing values</option>\n",
       "                        \n",
       "                            <option value=\"Not missing values\" selected>Not missing values</option>\n",
       "                        \n",
       "                    </select>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "        \n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "$(\"[id^=optionselect][id$=0923d868]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).val();\n",
       "    if (thisValue == \"None\"){\n",
       "        thisValue = null\n",
       "    }\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigure0923d868\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    }\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML0923d868');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"20499543AE4446FAA9707357577DE951\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution0923d868\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution0923d868\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution0923d868\").length > 0 ){\n",
       "                    $(\"#execution0923d868\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone0923d868 != \"undefined\"){\n",
       "                    onDisplayDone0923d868();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(pdf2,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',table_showrows='Not missing values',org_params='nostore_pixiedust',prefix='0923d868',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS0923d868').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(\"[id^=optionchecked][id$=0923d868]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).prop('checked').toString();\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigure0923d868\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    } \n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML0923d868');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"20499543AE4446FAA9707357577DE951\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution0923d868\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution0923d868\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution0923d868\").length > 0 ){\n",
       "                    $(\"#execution0923d868\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone0923d868 != \"undefined\"){\n",
       "                    onDisplayDone0923d868();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(pdf2,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',table_showrows='Not missing values',org_params='nostore_pixiedust',prefix='0923d868',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS0923d868').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(document).ready(function(){ $('[data-toggle=\"pd-tooltip\"]').tooltip(); });\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "display(pdf2,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',table_showrows='Not missing values',org_params='nostore_pixiedust',prefix='0923d868',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#TARGET=SPARK\n",
    "d = [(1, 3, 'pie'), (None, 6, 'ice cream'), (2, None, 'cookies'), (1, 5, None), (7, 9, 'cake')]\n",
    "pdf = sqlContext.createDataFrame(d, ['col1', 'col2', 'col3'])\n",
    "pdf.count()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "<div class=\"row chart-button-group\">\n",
       "    <div class=\"form-group col-sm-9\" style=\"padding-right:10px;\">\n",
       "        \n",
       "        <button pd_app=\"pixiedust.display.chart.renderers.table.tableOptions.TableOptions\" \n",
       "            class=\"btn btn-default no_loading_msg\"\n",
       "            pd_options=\"runInDialog=true\"\n",
       "            id=\"option_btn_a148c8f6\">\n",
       "            <pd_event_handler pd_source=\"option_btn_a148c8f6\" pd_script=\"ShellAccess[eventInfo['entity']].on_ok()\"></pd_event_handler>\n",
       "            Options\n",
       "        </button>\n",
       "        \n",
       "        \n",
       "        \n",
       "        <button pd_app=\"pixiedust.apps.gateway.share.ShareChartApp\" \n",
       "                pd_options=\"runInDialog=true;title=Share Chart\" \n",
       "                class=\"btn btn-default no_loading_msg\">\n",
       "            Share\n",
       "        </button>\n",
       "    </div>\n",
       "    \n",
       "    <div class=\"form-group col-sm-3\">\n",
       "        \n",
       "    </div>\n",
       "    \n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "\n",
       "$(\"#renderera148c8f6\").change(function(){\n",
       "    var rendererId = $(this).val();\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTMLa148c8f6');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTMLa148c8f6');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"20499543AE4446FAA9707357577DE951\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#executiona148c8f6\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#executiona148c8f6\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#executiona148c8f6\").length > 0 ){\n",
       "                    $(\"#executiona148c8f6\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDonea148c8f6 != \"undefined\"){\n",
       "                    onDisplayDonea148c8f6();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(pdf,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',table_showrows='Not missing values',org_params='nostore_pixiedust',prefix='a148c8f6',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        addOptions({\"rendererId\": rendererId });\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJSa148c8f6').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()\n",
       "});\n",
       "</script>\n",
       "\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\">\n",
       "        <div class=\"pd_save\" style=\"padding-right:10px;text-align: center;line-height:initial !important;font-size: xx-large;font-weight: 500;color: coral;\">\n",
       "            \n",
       "        </div>\n",
       "    </div>\n",
       "</div>\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\" style=\"padding-right:10px;\">\n",
       "        <div id=\"chartFigurea148c8f6\" class=\"pd_save\" style=\"overflow-x:auto\">\n",
       "            <style type=\"text/css\" class=\"pd_save\">\n",
       "    .df-table-wrapper .panel-heading {\n",
       "      border-radius: 0;\n",
       "      padding: 0px;\n",
       "    }\n",
       "    .df-table-wrapper .panel-heading:hover {\n",
       "      border-color: #008571;\n",
       "    }\n",
       "    .df-table-wrapper .panel-title a {\n",
       "      background-color: #f9f9fb;\n",
       "      color: #333333;\n",
       "      display: block;\n",
       "      outline: none;\n",
       "      padding: 10px 15px;\n",
       "      text-decoration: none;\n",
       "    }\n",
       "    .df-table-wrapper .panel-title a:hover {\n",
       "      background-color: #337ab7;\n",
       "      border-color: #2e6da4;\n",
       "      color: #ffffff;\n",
       "      display: block;\n",
       "      padding: 10px 15px;\n",
       "      text-decoration: none;\n",
       "    }\n",
       "    .df-table-wrapper {\n",
       "      font-size: small;\n",
       "      font-weight: 300;\n",
       "      letter-spacing: 0.5px;\n",
       "      line-height: normal;\n",
       "      height: inherit;\n",
       "      overflow: auto;\n",
       "    }\n",
       "    .df-table-search {\n",
       "      margin: 0 0 20px 0;\n",
       "    }\n",
       "    .df-table-search-count {\n",
       "      display: inline-block;\n",
       "      margin: 0 0 20px 0;\n",
       "    }\n",
       "    .df-table-container {\n",
       "      max-height: 50vh;\n",
       "      max-width: 100%;\n",
       "      overflow-x: auto;\n",
       "      position: relative;\n",
       "    }\n",
       "    .df-table-wrapper table {\n",
       "      border: 0 none #ffffff;\n",
       "      border-collapse: collapse;\n",
       "      margin: 0;\n",
       "      min-width: 100%;\n",
       "      padding: 0;\n",
       "      table-layout: fixed;\n",
       "      height: inherit;\n",
       "      overflow: auto;\n",
       "    }\n",
       "    .df-table-wrapper tr.hidden {\n",
       "      display: none;\n",
       "    }\n",
       "    .df-table-wrapper tr:nth-child(even) {\n",
       "      background-color: #f9f9fb;\n",
       "    }\n",
       "    .df-table-wrapper tr.even {\n",
       "      background-color: #f9f9fb;\n",
       "    }\n",
       "    .df-table-wrapper tr.odd {\n",
       "      background-color: #ffffff;\n",
       "    }\n",
       "    .df-table-wrapper td + td {\n",
       "      border-left: 1px solid #e0e0e0;\n",
       "    }\n",
       "  \n",
       "    .df-table-wrapper thead,\n",
       "    .fixed-header {\n",
       "      font-weight: 600;\n",
       "    }\n",
       "    .df-table-wrapper tr,\n",
       "    .fixed-row {\n",
       "      border: 0 none #ffffff;\n",
       "      margin: 0;\n",
       "      padding: 0;\n",
       "    }\n",
       "    .df-table-wrapper th,\n",
       "    .df-table-wrapper td,\n",
       "    .fixed-cell {\n",
       "      border: 0 none #ffffff;\n",
       "      margin: 0;\n",
       "      min-width: 50px;\n",
       "      padding: 5px 20px 5px 10px;\n",
       "      text-align: left;\n",
       "      word-wrap: break-word;\n",
       "    }\n",
       "    .df-table-wrapper th {\n",
       "      padding-bottom: 0;\n",
       "      padding-top: 0;\n",
       "    }\n",
       "    .df-table-wrapper th div {\n",
       "      max-height: 1px;\n",
       "      visibility: hidden;\n",
       "    }\n",
       "  \n",
       "    .df-schema-field {\n",
       "      margin-left: 10px;\n",
       "    }\n",
       "  \n",
       "    .fixed-header-container {\n",
       "      overflow: hidden;\n",
       "      position: relative;\n",
       "    }\n",
       "    .fixed-header {\n",
       "      border-bottom: 2px solid #000;\n",
       "      display: table;\n",
       "      position: relative;\n",
       "    }\n",
       "    .fixed-row {\n",
       "      display: table-row;\n",
       "    }\n",
       "    .fixed-cell {\n",
       "      display: table-cell;\n",
       "    }\n",
       "  </style>\n",
       "  \n",
       "  \n",
       "  \n",
       "  <div class=\"df-table-wrapper df-table-wrapper-a148c8f6 panel-group pd_save\">\n",
       "    <!-- dataframe schema -->\n",
       "    \n",
       "    <div class=\"panel panel-default\">\n",
       "      <div class=\"panel-heading\">\n",
       "        <h4 class=\"panel-title\" style=\"margin: 0px;\">\n",
       "          <a data-toggle=\"collapse\" href=\"#df-schema-a148c8f6\" data-parent=\"#df-table-wrapper-a148c8f6\">Schema</a>\n",
       "        </h4>\n",
       "      </div>\n",
       "      <div id=\"df-schema-a148c8f6\" class=\"panel-collapse collapse\">\n",
       "        <div class=\"panel-body\" style=\"font-family: monospace;\">\n",
       "          <div class=\"df-schema-fields\">\n",
       "            <div>Field types:</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>col1: </strong> float64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>col2: </strong> float64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>col3: </strong> object</div>\n",
       "            \n",
       "          </div>\n",
       "        </div>\n",
       "      </div>\n",
       "    </div>\n",
       "    \n",
       "    <!-- dataframe table -->\n",
       "    <div class=\"panel panel-default\" >\n",
       "      \n",
       "      <div class=\"panel-heading\">\n",
       "        <h4 class=\"panel-title\" style=\"margin: 0px;\">\n",
       "          <a data-toggle=\"collapse\" href=\"#df-table-a148c8f6\" data-parent=\"#df-table-wrapper-a148c8f6\"> Table</a>\n",
       "        </h4>\n",
       "      </div>\n",
       "      \n",
       "      <div id=\"df-table-a148c8f6\" class=\"panel-collapse collapse in\">\n",
       "        <div class=\"panel-body\">\n",
       "          \n",
       "          <input type=\"text\" class=\"df-table-search form-control input-sm\" placeholder=\"Search table\">\n",
       "          \n",
       "          <div>\n",
       "            \n",
       "            <span class=\"df-table-search-count\">Showing 2 of 5 rows</span>\n",
       "            \n",
       "          </div>\n",
       "          <!-- fixed header for when dataframe table scrolls -->\n",
       "          <div class=\"fixed-header-container\">\n",
       "            <div class=\"fixed-header\">\n",
       "              <div class=\"fixed-row\">\n",
       "                \n",
       "                <div class=\"fixed-cell\" >col1</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\" >col2</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\" >col3</div>\n",
       "                \n",
       "              </div>\n",
       "            </div>\n",
       "          </div>\n",
       "          <div class=\"df-table-container\">\n",
       "            <table class=\"df-table\">\n",
       "              <thead>\n",
       "                <tr>\n",
       "                  \n",
       "                  <th ><div>col1</div></th>\n",
       "                  \n",
       "                  <th ><div>col2</div></th>\n",
       "                  \n",
       "                  <th ><div>col3</div></th>\n",
       "                  \n",
       "                </tr>\n",
       "              </thead>\n",
       "              <tbody>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >7.0</td>\n",
       "                  \n",
       "                  <td >9.0</td>\n",
       "                  \n",
       "                  <td >cake</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >1.0</td>\n",
       "                  \n",
       "                  <td >3.0</td>\n",
       "                  \n",
       "                  <td >pie</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "              </tbody>\n",
       "            </table>\n",
       "          </div>\n",
       "        </div>\n",
       "      </div>\n",
       "    </div>\n",
       "  </div>\n",
       "  \n",
       "  <script class=\"pd_save\">\n",
       "    $(function() {\n",
       "      var tableWrapper = $('.df-table-wrapper-a148c8f6');\n",
       "      var fixedHeader = $('.fixed-header', tableWrapper);\n",
       "      var tableContainer = $('.df-table-container', tableWrapper);\n",
       "      var table = $('.df-table', tableContainer);\n",
       "      var rows = $('tbody > tr', table);\n",
       "      var total = 2;\n",
       "  \n",
       "      fixedHeader\n",
       "        .css('width', table.width())\n",
       "        .find('.fixed-cell')\n",
       "        .each(function(i, e) {\n",
       "          $(this).css('width', $('.df-table-wrapper-a148c8f6 th:nth-child(' + (i+1) + ')').css('width'));\n",
       "        });\n",
       "  \n",
       "      tableContainer.scroll(function() {\n",
       "        fixedHeader.css({ left: table.position().left });\n",
       "      });\n",
       "  \n",
       "      rows.on(\"click\", function(e){\n",
       "          // var txt = e.delegateTarget.innerText;\n",
       "          var splits = $(e.delegateTarget).text().trim().replace(/[\\n\\r]/g, '\\t').split(\"\\t\").map(function(item){return item.trim()}).filter(function(item){return item!=\"\"});\n",
       "          // var splits = txt.split(\"\\t\");\n",
       "          var len = splits.length;\n",
       "          var hdrs = $(fixedHeader).find(\".fixed-cell\");\n",
       "          // Add all cells in the selected row as a map to be consumed by the target as needed\n",
       "          var payload = {type:\"select\", targetDivId: \"\" };\n",
       "          for (var i = 0; i < len; i++) {\n",
       "            payload[hdrs[i].innerHTML] = splits[i];\n",
       "          }\n",
       "  \n",
       "          //simple selection highlighting, client adds \"selected\" class\n",
       "          $(this).addClass(\"selected\").siblings().removeClass(\"selected\");\n",
       "          $(document).trigger('pd_event', payload);\n",
       "      });\n",
       "  \n",
       "      $('.df-table-search', tableWrapper).keyup(function() {\n",
       "        var val = '^(?=.*\\\\b' + $.trim($(this).val()).split(/\\s+/).join('\\\\b)(?=.*\\\\b') + ').*$';\n",
       "        var reg = RegExp(val, 'i');\n",
       "        var index = 0;\n",
       "        \n",
       "        rows.each(function(i, e) {\n",
       "          if (!reg.test($(this).text().replace(/\\s+/g, ' '))) {\n",
       "            $(this).attr('class', 'hidden');\n",
       "          }\n",
       "          else {\n",
       "            $(this).attr('class', (++index % 2 == 0 ? 'even' : 'odd'));\n",
       "          }\n",
       "        });\n",
       "        $('.df-table-search-count', tableWrapper).html('Showing ' + index + ' of ' + total + ' rows');\n",
       "      });\n",
       "    });\n",
       "  \n",
       "    $(\".df-table-wrapper td:contains('http://')\").each(function(){var tc = this.textContent; $(this).wrapInner(\"<a target='_blank' href='\" + tc + \"'/>\");});\n",
       "    $(\".df-table-wrapper td:contains('https://')\").each(function(){var tc = this.textContent; $(this).wrapInner(\"<a target='_blank' href='\" + tc + \"'/>\");});\n",
       "  </script>\n",
       "  \n",
       "        </div>\n",
       "    </div>\n",
       "    <div class=\"form-group col-sm-2 rendererOpts\">\n",
       "        \n",
       "        <div><strong>Table View Options</strong></div>\n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_noschemaa148c8f6\" r=\"f\" type=\"checkbox\" name=\"table_noschema\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_noschemaa148c8f6\">Hide Schema</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_nosearcha148c8f6\" r=\"f\" type=\"checkbox\" name=\"table_nosearch\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_nosearcha148c8f6\">Hide Search</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_nocounta148c8f6\" r=\"f\" type=\"checkbox\" name=\"table_nocount\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_nocounta148c8f6\">Hide Row Count</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Show Rows:</label>\n",
       "                    <i class=\"fa fa-info-circle\" style=\"color:orange\" data-toggle=\"pd-tooltip\" title=\"Warning: this filter only applies to the sampled data and not the original data set\"></i>\n",
       "                    <select class=\"form-control\" id=\"optionselecttable_showrowsa148c8f6\" name=\"table_showrows\" r=\"f\" style=\"margin-left: 0px;\">\n",
       "                        \n",
       "                            <option value=\"All\" selected>All</option>\n",
       "                        \n",
       "                            <option value=\"Missing values\" >Missing values</option>\n",
       "                        \n",
       "                            <option value=\"Not missing values\" selected>Not missing values</option>\n",
       "                        \n",
       "                    </select>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "        \n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "$(\"[id^=optionselect][id$=a148c8f6]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).val();\n",
       "    if (thisValue == \"None\"){\n",
       "        thisValue = null\n",
       "    }\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigurea148c8f6\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    }\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTMLa148c8f6');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"20499543AE4446FAA9707357577DE951\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#executiona148c8f6\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#executiona148c8f6\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#executiona148c8f6\").length > 0 ){\n",
       "                    $(\"#executiona148c8f6\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDonea148c8f6 != \"undefined\"){\n",
       "                    onDisplayDonea148c8f6();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(pdf,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',table_showrows='Not missing values',org_params='nostore_pixiedust',prefix='a148c8f6',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJSa148c8f6').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(\"[id^=optionchecked][id$=a148c8f6]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).prop('checked').toString();\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigurea148c8f6\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    } \n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTMLa148c8f6');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"20499543AE4446FAA9707357577DE951\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#executiona148c8f6\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#executiona148c8f6\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#executiona148c8f6\").length > 0 ){\n",
       "                    $(\"#executiona148c8f6\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDonea148c8f6 != \"undefined\"){\n",
       "                    onDisplayDonea148c8f6();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(pdf,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',table_showrows='Not missing values',org_params='nostore_pixiedust',prefix='a148c8f6',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJSa148c8f6').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(document).ready(function(){ $('[data-toggle=\"pd-tooltip\"]').tooltip(); });\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#TARGET=SPARK\n",
    "display(pdf,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',table_showrows='Not missing values',org_params='nostore_pixiedust',prefix='a148c8f6',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "<div class=\"row chart-button-group\">\n",
       "    <div class=\"form-group col-sm-9\" style=\"padding-right:10px;\">\n",
       "        \n",
       "        <button pd_app=\"pixiedust.display.chart.renderers.table.tableOptions.TableOptions\" \n",
       "            class=\"btn btn-default no_loading_msg\"\n",
       "            pd_options=\"runInDialog=true\"\n",
       "            id=\"option_btn_a4c4be27\">\n",
       "            <pd_event_handler pd_source=\"option_btn_a4c4be27\" pd_script=\"ShellAccess[eventInfo['entity']].on_ok()\"></pd_event_handler>\n",
       "            Options\n",
       "        </button>\n",
       "        \n",
       "        \n",
       "        \n",
       "        <button pd_app=\"pixiedust.apps.gateway.share.ShareChartApp\" \n",
       "                pd_options=\"runInDialog=true;title=Share Chart\" \n",
       "                class=\"btn btn-default no_loading_msg\">\n",
       "            Share\n",
       "        </button>\n",
       "    </div>\n",
       "    \n",
       "    <div class=\"form-group col-sm-3\">\n",
       "        \n",
       "    </div>\n",
       "    \n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "\n",
       "$(\"#renderera4c4be27\").change(function(){\n",
       "    var rendererId = $(this).val();\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTMLa4c4be27');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTMLa4c4be27');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"20499543AE4446FAA9707357577DE951\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#executiona4c4be27\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#executiona4c4be27\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#executiona4c4be27\").length > 0 ){\n",
       "                    $(\"#executiona4c4be27\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDonea4c4be27 != \"undefined\"){\n",
       "                    onDisplayDonea4c4be27();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(pdf,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',table_showrows='Missing values',org_params='nostore_pixiedust',prefix='a4c4be27',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        addOptions({\"rendererId\": rendererId });\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJSa4c4be27').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()\n",
       "});\n",
       "</script>\n",
       "\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\">\n",
       "        <div class=\"pd_save\" style=\"padding-right:10px;text-align: center;line-height:initial !important;font-size: xx-large;font-weight: 500;color: coral;\">\n",
       "            \n",
       "        </div>\n",
       "    </div>\n",
       "</div>\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\" style=\"padding-right:10px;\">\n",
       "        <div id=\"chartFigurea4c4be27\" class=\"pd_save\" style=\"overflow-x:auto\">\n",
       "            <style type=\"text/css\" class=\"pd_save\">\n",
       "    .df-table-wrapper .panel-heading {\n",
       "      border-radius: 0;\n",
       "      padding: 0px;\n",
       "    }\n",
       "    .df-table-wrapper .panel-heading:hover {\n",
       "      border-color: #008571;\n",
       "    }\n",
       "    .df-table-wrapper .panel-title a {\n",
       "      background-color: #f9f9fb;\n",
       "      color: #333333;\n",
       "      display: block;\n",
       "      outline: none;\n",
       "      padding: 10px 15px;\n",
       "      text-decoration: none;\n",
       "    }\n",
       "    .df-table-wrapper .panel-title a:hover {\n",
       "      background-color: #337ab7;\n",
       "      border-color: #2e6da4;\n",
       "      color: #ffffff;\n",
       "      display: block;\n",
       "      padding: 10px 15px;\n",
       "      text-decoration: none;\n",
       "    }\n",
       "    .df-table-wrapper {\n",
       "      font-size: small;\n",
       "      font-weight: 300;\n",
       "      letter-spacing: 0.5px;\n",
       "      line-height: normal;\n",
       "      height: inherit;\n",
       "      overflow: auto;\n",
       "    }\n",
       "    .df-table-search {\n",
       "      margin: 0 0 20px 0;\n",
       "    }\n",
       "    .df-table-search-count {\n",
       "      display: inline-block;\n",
       "      margin: 0 0 20px 0;\n",
       "    }\n",
       "    .df-table-container {\n",
       "      max-height: 50vh;\n",
       "      max-width: 100%;\n",
       "      overflow-x: auto;\n",
       "      position: relative;\n",
       "    }\n",
       "    .df-table-wrapper table {\n",
       "      border: 0 none #ffffff;\n",
       "      border-collapse: collapse;\n",
       "      margin: 0;\n",
       "      min-width: 100%;\n",
       "      padding: 0;\n",
       "      table-layout: fixed;\n",
       "      height: inherit;\n",
       "      overflow: auto;\n",
       "    }\n",
       "    .df-table-wrapper tr.hidden {\n",
       "      display: none;\n",
       "    }\n",
       "    .df-table-wrapper tr:nth-child(even) {\n",
       "      background-color: #f9f9fb;\n",
       "    }\n",
       "    .df-table-wrapper tr.even {\n",
       "      background-color: #f9f9fb;\n",
       "    }\n",
       "    .df-table-wrapper tr.odd {\n",
       "      background-color: #ffffff;\n",
       "    }\n",
       "    .df-table-wrapper td + td {\n",
       "      border-left: 1px solid #e0e0e0;\n",
       "    }\n",
       "  \n",
       "    .df-table-wrapper thead,\n",
       "    .fixed-header {\n",
       "      font-weight: 600;\n",
       "    }\n",
       "    .df-table-wrapper tr,\n",
       "    .fixed-row {\n",
       "      border: 0 none #ffffff;\n",
       "      margin: 0;\n",
       "      padding: 0;\n",
       "    }\n",
       "    .df-table-wrapper th,\n",
       "    .df-table-wrapper td,\n",
       "    .fixed-cell {\n",
       "      border: 0 none #ffffff;\n",
       "      margin: 0;\n",
       "      min-width: 50px;\n",
       "      padding: 5px 20px 5px 10px;\n",
       "      text-align: left;\n",
       "      word-wrap: break-word;\n",
       "    }\n",
       "    .df-table-wrapper th {\n",
       "      padding-bottom: 0;\n",
       "      padding-top: 0;\n",
       "    }\n",
       "    .df-table-wrapper th div {\n",
       "      max-height: 1px;\n",
       "      visibility: hidden;\n",
       "    }\n",
       "  \n",
       "    .df-schema-field {\n",
       "      margin-left: 10px;\n",
       "    }\n",
       "  \n",
       "    .fixed-header-container {\n",
       "      overflow: hidden;\n",
       "      position: relative;\n",
       "    }\n",
       "    .fixed-header {\n",
       "      border-bottom: 2px solid #000;\n",
       "      display: table;\n",
       "      position: relative;\n",
       "    }\n",
       "    .fixed-row {\n",
       "      display: table-row;\n",
       "    }\n",
       "    .fixed-cell {\n",
       "      display: table-cell;\n",
       "    }\n",
       "  </style>\n",
       "  \n",
       "  \n",
       "  \n",
       "  <div class=\"df-table-wrapper df-table-wrapper-a4c4be27 panel-group pd_save\">\n",
       "    <!-- dataframe schema -->\n",
       "    \n",
       "    <div class=\"panel panel-default\">\n",
       "      <div class=\"panel-heading\">\n",
       "        <h4 class=\"panel-title\" style=\"margin: 0px;\">\n",
       "          <a data-toggle=\"collapse\" href=\"#df-schema-a4c4be27\" data-parent=\"#df-table-wrapper-a4c4be27\">Schema</a>\n",
       "        </h4>\n",
       "      </div>\n",
       "      <div id=\"df-schema-a4c4be27\" class=\"panel-collapse collapse\">\n",
       "        <div class=\"panel-body\" style=\"font-family: monospace;\">\n",
       "          <div class=\"df-schema-fields\">\n",
       "            <div>Field types:</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>col1: </strong> float64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>col2: </strong> float64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>col3: </strong> object</div>\n",
       "            \n",
       "          </div>\n",
       "        </div>\n",
       "      </div>\n",
       "    </div>\n",
       "    \n",
       "    <!-- dataframe table -->\n",
       "    <div class=\"panel panel-default\" >\n",
       "      \n",
       "      <div class=\"panel-heading\">\n",
       "        <h4 class=\"panel-title\" style=\"margin: 0px;\">\n",
       "          <a data-toggle=\"collapse\" href=\"#df-table-a4c4be27\" data-parent=\"#df-table-wrapper-a4c4be27\"> Table</a>\n",
       "        </h4>\n",
       "      </div>\n",
       "      \n",
       "      <div id=\"df-table-a4c4be27\" class=\"panel-collapse collapse in\">\n",
       "        <div class=\"panel-body\">\n",
       "          \n",
       "          <input type=\"text\" class=\"df-table-search form-control input-sm\" placeholder=\"Search table\">\n",
       "          \n",
       "          <div>\n",
       "            \n",
       "            <span class=\"df-table-search-count\">Showing 3 of 5 rows</span>\n",
       "            \n",
       "          </div>\n",
       "          <!-- fixed header for when dataframe table scrolls -->\n",
       "          <div class=\"fixed-header-container\">\n",
       "            <div class=\"fixed-header\">\n",
       "              <div class=\"fixed-row\">\n",
       "                \n",
       "                <div class=\"fixed-cell\" >col1</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\" >col2</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\" >col3</div>\n",
       "                \n",
       "              </div>\n",
       "            </div>\n",
       "          </div>\n",
       "          <div class=\"df-table-container\">\n",
       "            <table class=\"df-table\">\n",
       "              <thead>\n",
       "                <tr>\n",
       "                  \n",
       "                  <th ><div>col1</div></th>\n",
       "                  \n",
       "                  <th ><div>col2</div></th>\n",
       "                  \n",
       "                  <th ><div>col3</div></th>\n",
       "                  \n",
       "                </tr>\n",
       "              </thead>\n",
       "              <tbody>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >nan</td>\n",
       "                  \n",
       "                  <td >6.0</td>\n",
       "                  \n",
       "                  <td >ice cream</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >2.0</td>\n",
       "                  \n",
       "                  <td >nan</td>\n",
       "                  \n",
       "                  <td >cookies</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >1.0</td>\n",
       "                  \n",
       "                  <td >5.0</td>\n",
       "                  \n",
       "                  <td >None</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "              </tbody>\n",
       "            </table>\n",
       "          </div>\n",
       "        </div>\n",
       "      </div>\n",
       "    </div>\n",
       "  </div>\n",
       "  \n",
       "  <script class=\"pd_save\">\n",
       "    $(function() {\n",
       "      var tableWrapper = $('.df-table-wrapper-a4c4be27');\n",
       "      var fixedHeader = $('.fixed-header', tableWrapper);\n",
       "      var tableContainer = $('.df-table-container', tableWrapper);\n",
       "      var table = $('.df-table', tableContainer);\n",
       "      var rows = $('tbody > tr', table);\n",
       "      var total = 3;\n",
       "  \n",
       "      fixedHeader\n",
       "        .css('width', table.width())\n",
       "        .find('.fixed-cell')\n",
       "        .each(function(i, e) {\n",
       "          $(this).css('width', $('.df-table-wrapper-a4c4be27 th:nth-child(' + (i+1) + ')').css('width'));\n",
       "        });\n",
       "  \n",
       "      tableContainer.scroll(function() {\n",
       "        fixedHeader.css({ left: table.position().left });\n",
       "      });\n",
       "  \n",
       "      rows.on(\"click\", function(e){\n",
       "          // var txt = e.delegateTarget.innerText;\n",
       "          var splits = $(e.delegateTarget).text().trim().replace(/[\\n\\r]/g, '\\t').split(\"\\t\").map(function(item){return item.trim()}).filter(function(item){return item!=\"\"});\n",
       "          // var splits = txt.split(\"\\t\");\n",
       "          var len = splits.length;\n",
       "          var hdrs = $(fixedHeader).find(\".fixed-cell\");\n",
       "          // Add all cells in the selected row as a map to be consumed by the target as needed\n",
       "          var payload = {type:\"select\", targetDivId: \"\" };\n",
       "          for (var i = 0; i < len; i++) {\n",
       "            payload[hdrs[i].innerHTML] = splits[i];\n",
       "          }\n",
       "  \n",
       "          //simple selection highlighting, client adds \"selected\" class\n",
       "          $(this).addClass(\"selected\").siblings().removeClass(\"selected\");\n",
       "          $(document).trigger('pd_event', payload);\n",
       "      });\n",
       "  \n",
       "      $('.df-table-search', tableWrapper).keyup(function() {\n",
       "        var val = '^(?=.*\\\\b' + $.trim($(this).val()).split(/\\s+/).join('\\\\b)(?=.*\\\\b') + ').*$';\n",
       "        var reg = RegExp(val, 'i');\n",
       "        var index = 0;\n",
       "        \n",
       "        rows.each(function(i, e) {\n",
       "          if (!reg.test($(this).text().replace(/\\s+/g, ' '))) {\n",
       "            $(this).attr('class', 'hidden');\n",
       "          }\n",
       "          else {\n",
       "            $(this).attr('class', (++index % 2 == 0 ? 'even' : 'odd'));\n",
       "          }\n",
       "        });\n",
       "        $('.df-table-search-count', tableWrapper).html('Showing ' + index + ' of ' + total + ' rows');\n",
       "      });\n",
       "    });\n",
       "  \n",
       "    $(\".df-table-wrapper td:contains('http://')\").each(function(){var tc = this.textContent; $(this).wrapInner(\"<a target='_blank' href='\" + tc + \"'/>\");});\n",
       "    $(\".df-table-wrapper td:contains('https://')\").each(function(){var tc = this.textContent; $(this).wrapInner(\"<a target='_blank' href='\" + tc + \"'/>\");});\n",
       "  </script>\n",
       "  \n",
       "        </div>\n",
       "    </div>\n",
       "    <div class=\"form-group col-sm-2 rendererOpts\">\n",
       "        \n",
       "        <div><strong>Table View Options</strong></div>\n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_noschemaa4c4be27\" r=\"f\" type=\"checkbox\" name=\"table_noschema\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_noschemaa4c4be27\">Hide Schema</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_nosearcha4c4be27\" r=\"f\" type=\"checkbox\" name=\"table_nosearch\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_nosearcha4c4be27\">Hide Search</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_nocounta4c4be27\" r=\"f\" type=\"checkbox\" name=\"table_nocount\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_nocounta4c4be27\">Hide Row Count</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Show Rows:</label>\n",
       "                    <i class=\"fa fa-info-circle\" style=\"color:orange\" data-toggle=\"pd-tooltip\" title=\"Warning: this filter only applies to the sampled data and not the original data set\"></i>\n",
       "                    <select class=\"form-control\" id=\"optionselecttable_showrowsa4c4be27\" name=\"table_showrows\" r=\"f\" style=\"margin-left: 0px;\">\n",
       "                        \n",
       "                            <option value=\"All\" selected>All</option>\n",
       "                        \n",
       "                            <option value=\"Missing values\" selected>Missing values</option>\n",
       "                        \n",
       "                            <option value=\"Not missing values\" >Not missing values</option>\n",
       "                        \n",
       "                    </select>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "        \n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "$(\"[id^=optionselect][id$=a4c4be27]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).val();\n",
       "    if (thisValue == \"None\"){\n",
       "        thisValue = null\n",
       "    }\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigurea4c4be27\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    }\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTMLa4c4be27');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"20499543AE4446FAA9707357577DE951\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#executiona4c4be27\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#executiona4c4be27\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#executiona4c4be27\").length > 0 ){\n",
       "                    $(\"#executiona4c4be27\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDonea4c4be27 != \"undefined\"){\n",
       "                    onDisplayDonea4c4be27();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(pdf,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',table_showrows='Missing values',org_params='nostore_pixiedust',prefix='a4c4be27',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJSa4c4be27').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(\"[id^=optionchecked][id$=a4c4be27]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).prop('checked').toString();\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigurea4c4be27\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    } \n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTMLa4c4be27');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"20499543AE4446FAA9707357577DE951\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#executiona4c4be27\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#executiona4c4be27\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#executiona4c4be27\").length > 0 ){\n",
       "                    $(\"#executiona4c4be27\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDonea4c4be27 != \"undefined\"){\n",
       "                    onDisplayDonea4c4be27();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(pdf,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',table_showrows='Missing values',org_params='nostore_pixiedust',prefix='a4c4be27',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJSa4c4be27').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(document).ready(function(){ $('[data-toggle=\"pd-tooltip\"]').tooltip(); });\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#TARGET=SPARK\n",
    "display(pdf,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',table_showrows='Missing values',org_params='nostore_pixiedust',prefix='a4c4be27',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "\n",
       "<div class=\"row chart-button-group\">\n",
       "    <div class=\"form-group col-sm-9\" style=\"padding-right:10px;\">\n",
       "        \n",
       "        <button pd_app=\"pixiedust.display.chart.renderers.table.tableOptions.TableOptions\" \n",
       "            class=\"btn btn-default no_loading_msg\"\n",
       "            pd_options=\"runInDialog=true\"\n",
       "            id=\"option_btn_49fe4045\">\n",
       "            <pd_event_handler pd_source=\"option_btn_49fe4045\" pd_script=\"ShellAccess[eventInfo['entity']].on_ok()\"></pd_event_handler>\n",
       "            Options\n",
       "        </button>\n",
       "        \n",
       "        \n",
       "        \n",
       "        <button pd_app=\"pixiedust.apps.gateway.share.ShareChartApp\" \n",
       "                pd_options=\"runInDialog=true;title=Share Chart\" \n",
       "                class=\"btn btn-default no_loading_msg\">\n",
       "            Share\n",
       "        </button>\n",
       "    </div>\n",
       "    \n",
       "    <div class=\"form-group col-sm-3\">\n",
       "        \n",
       "    </div>\n",
       "    \n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "\n",
       "$(\"#renderer49fe4045\").change(function(){\n",
       "    var rendererId = $(this).val();\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + 'wrapperHTML49fe4045');\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML49fe4045');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"20499543AE4446FAA9707357577DE951\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution49fe4045\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution49fe4045\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution49fe4045\").length > 0 ){\n",
       "                    $(\"#execution49fe4045\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone49fe4045 != \"undefined\"){\n",
       "                    onDisplayDone49fe4045();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(pdf,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',org_params='nostore_pixiedust',prefix='49fe4045',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        addOptions({\"rendererId\": rendererId });\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS49fe4045').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()\n",
       "});\n",
       "</script>\n",
       "\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\">\n",
       "        <div class=\"pd_save\" style=\"padding-right:10px;text-align: center;line-height:initial !important;font-size: xx-large;font-weight: 500;color: coral;\">\n",
       "            \n",
       "        </div>\n",
       "    </div>\n",
       "</div>\n",
       "<div class=\"row\">\n",
       "    <div class=\"form-group col-sm-10\" style=\"padding-right:10px;\">\n",
       "        <div id=\"chartFigure49fe4045\" class=\"pd_save\" style=\"overflow-x:auto\">\n",
       "            <style type=\"text/css\" class=\"pd_save\">\n",
       "    .df-table-wrapper .panel-heading {\n",
       "      border-radius: 0;\n",
       "      padding: 0px;\n",
       "    }\n",
       "    .df-table-wrapper .panel-heading:hover {\n",
       "      border-color: #008571;\n",
       "    }\n",
       "    .df-table-wrapper .panel-title a {\n",
       "      background-color: #f9f9fb;\n",
       "      color: #333333;\n",
       "      display: block;\n",
       "      outline: none;\n",
       "      padding: 10px 15px;\n",
       "      text-decoration: none;\n",
       "    }\n",
       "    .df-table-wrapper .panel-title a:hover {\n",
       "      background-color: #337ab7;\n",
       "      border-color: #2e6da4;\n",
       "      color: #ffffff;\n",
       "      display: block;\n",
       "      padding: 10px 15px;\n",
       "      text-decoration: none;\n",
       "    }\n",
       "    .df-table-wrapper {\n",
       "      font-size: small;\n",
       "      font-weight: 300;\n",
       "      letter-spacing: 0.5px;\n",
       "      line-height: normal;\n",
       "      height: inherit;\n",
       "      overflow: auto;\n",
       "    }\n",
       "    .df-table-search {\n",
       "      margin: 0 0 20px 0;\n",
       "    }\n",
       "    .df-table-search-count {\n",
       "      display: inline-block;\n",
       "      margin: 0 0 20px 0;\n",
       "    }\n",
       "    .df-table-container {\n",
       "      max-height: 50vh;\n",
       "      max-width: 100%;\n",
       "      overflow-x: auto;\n",
       "      position: relative;\n",
       "    }\n",
       "    .df-table-wrapper table {\n",
       "      border: 0 none #ffffff;\n",
       "      border-collapse: collapse;\n",
       "      margin: 0;\n",
       "      min-width: 100%;\n",
       "      padding: 0;\n",
       "      table-layout: fixed;\n",
       "      height: inherit;\n",
       "      overflow: auto;\n",
       "    }\n",
       "    .df-table-wrapper tr.hidden {\n",
       "      display: none;\n",
       "    }\n",
       "    .df-table-wrapper tr:nth-child(even) {\n",
       "      background-color: #f9f9fb;\n",
       "    }\n",
       "    .df-table-wrapper tr.even {\n",
       "      background-color: #f9f9fb;\n",
       "    }\n",
       "    .df-table-wrapper tr.odd {\n",
       "      background-color: #ffffff;\n",
       "    }\n",
       "    .df-table-wrapper td + td {\n",
       "      border-left: 1px solid #e0e0e0;\n",
       "    }\n",
       "  \n",
       "    .df-table-wrapper thead,\n",
       "    .fixed-header {\n",
       "      font-weight: 600;\n",
       "    }\n",
       "    .df-table-wrapper tr,\n",
       "    .fixed-row {\n",
       "      border: 0 none #ffffff;\n",
       "      margin: 0;\n",
       "      padding: 0;\n",
       "    }\n",
       "    .df-table-wrapper th,\n",
       "    .df-table-wrapper td,\n",
       "    .fixed-cell {\n",
       "      border: 0 none #ffffff;\n",
       "      margin: 0;\n",
       "      min-width: 50px;\n",
       "      padding: 5px 20px 5px 10px;\n",
       "      text-align: left;\n",
       "      word-wrap: break-word;\n",
       "    }\n",
       "    .df-table-wrapper th {\n",
       "      padding-bottom: 0;\n",
       "      padding-top: 0;\n",
       "    }\n",
       "    .df-table-wrapper th div {\n",
       "      max-height: 1px;\n",
       "      visibility: hidden;\n",
       "    }\n",
       "  \n",
       "    .df-schema-field {\n",
       "      margin-left: 10px;\n",
       "    }\n",
       "  \n",
       "    .fixed-header-container {\n",
       "      overflow: hidden;\n",
       "      position: relative;\n",
       "    }\n",
       "    .fixed-header {\n",
       "      border-bottom: 2px solid #000;\n",
       "      display: table;\n",
       "      position: relative;\n",
       "    }\n",
       "    .fixed-row {\n",
       "      display: table-row;\n",
       "    }\n",
       "    .fixed-cell {\n",
       "      display: table-cell;\n",
       "    }\n",
       "  </style>\n",
       "  \n",
       "  \n",
       "  \n",
       "  <div class=\"df-table-wrapper df-table-wrapper-49fe4045 panel-group pd_save\">\n",
       "    <!-- dataframe schema -->\n",
       "    \n",
       "    <div class=\"panel panel-default\">\n",
       "      <div class=\"panel-heading\">\n",
       "        <h4 class=\"panel-title\" style=\"margin: 0px;\">\n",
       "          <a data-toggle=\"collapse\" href=\"#df-schema-49fe4045\" data-parent=\"#df-table-wrapper-49fe4045\">Schema</a>\n",
       "        </h4>\n",
       "      </div>\n",
       "      <div id=\"df-schema-49fe4045\" class=\"panel-collapse collapse\">\n",
       "        <div class=\"panel-body\" style=\"font-family: monospace;\">\n",
       "          <div class=\"df-schema-fields\">\n",
       "            <div>Field types:</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>col1: </strong> float64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>col2: </strong> float64</div>\n",
       "            \n",
       "              <div class=\"df-schema-field\"><strong>col3: </strong> object</div>\n",
       "            \n",
       "          </div>\n",
       "        </div>\n",
       "      </div>\n",
       "    </div>\n",
       "    \n",
       "    <!-- dataframe table -->\n",
       "    <div class=\"panel panel-default\" >\n",
       "      \n",
       "      <div class=\"panel-heading\">\n",
       "        <h4 class=\"panel-title\" style=\"margin: 0px;\">\n",
       "          <a data-toggle=\"collapse\" href=\"#df-table-49fe4045\" data-parent=\"#df-table-wrapper-49fe4045\"> Table</a>\n",
       "        </h4>\n",
       "      </div>\n",
       "      \n",
       "      <div id=\"df-table-49fe4045\" class=\"panel-collapse collapse in\">\n",
       "        <div class=\"panel-body\">\n",
       "          \n",
       "          <input type=\"text\" class=\"df-table-search form-control input-sm\" placeholder=\"Search table\">\n",
       "          \n",
       "          <div>\n",
       "            \n",
       "            <span class=\"df-table-search-count\">Showing 5 of 5 rows</span>\n",
       "            \n",
       "          </div>\n",
       "          <!-- fixed header for when dataframe table scrolls -->\n",
       "          <div class=\"fixed-header-container\">\n",
       "            <div class=\"fixed-header\">\n",
       "              <div class=\"fixed-row\">\n",
       "                \n",
       "                <div class=\"fixed-cell\" >col1</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\" >col2</div>\n",
       "                \n",
       "                <div class=\"fixed-cell\" >col3</div>\n",
       "                \n",
       "              </div>\n",
       "            </div>\n",
       "          </div>\n",
       "          <div class=\"df-table-container\">\n",
       "            <table class=\"df-table\">\n",
       "              <thead>\n",
       "                <tr>\n",
       "                  \n",
       "                  <th ><div>col1</div></th>\n",
       "                  \n",
       "                  <th ><div>col2</div></th>\n",
       "                  \n",
       "                  <th ><div>col3</div></th>\n",
       "                  \n",
       "                </tr>\n",
       "              </thead>\n",
       "              <tbody>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >nan</td>\n",
       "                  \n",
       "                  <td >6.0</td>\n",
       "                  \n",
       "                  <td >ice cream</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >2.0</td>\n",
       "                  \n",
       "                  <td >nan</td>\n",
       "                  \n",
       "                  <td >cookies</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >1.0</td>\n",
       "                  \n",
       "                  <td >5.0</td>\n",
       "                  \n",
       "                  <td >None</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >7.0</td>\n",
       "                  \n",
       "                  <td >9.0</td>\n",
       "                  \n",
       "                  <td >cake</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "                <tr>\n",
       "                  \n",
       "                  <td >1.0</td>\n",
       "                  \n",
       "                  <td >3.0</td>\n",
       "                  \n",
       "                  <td >pie</td>\n",
       "                  \n",
       "                </tr>\n",
       "                \n",
       "              </tbody>\n",
       "            </table>\n",
       "          </div>\n",
       "        </div>\n",
       "      </div>\n",
       "    </div>\n",
       "  </div>\n",
       "  \n",
       "  <script class=\"pd_save\">\n",
       "    $(function() {\n",
       "      var tableWrapper = $('.df-table-wrapper-49fe4045');\n",
       "      var fixedHeader = $('.fixed-header', tableWrapper);\n",
       "      var tableContainer = $('.df-table-container', tableWrapper);\n",
       "      var table = $('.df-table', tableContainer);\n",
       "      var rows = $('tbody > tr', table);\n",
       "      var total = 5;\n",
       "  \n",
       "      fixedHeader\n",
       "        .css('width', table.width())\n",
       "        .find('.fixed-cell')\n",
       "        .each(function(i, e) {\n",
       "          $(this).css('width', $('.df-table-wrapper-49fe4045 th:nth-child(' + (i+1) + ')').css('width'));\n",
       "        });\n",
       "  \n",
       "      tableContainer.scroll(function() {\n",
       "        fixedHeader.css({ left: table.position().left });\n",
       "      });\n",
       "  \n",
       "      rows.on(\"click\", function(e){\n",
       "          // var txt = e.delegateTarget.innerText;\n",
       "          var splits = $(e.delegateTarget).text().trim().replace(/[\\n\\r]/g, '\\t').split(\"\\t\").map(function(item){return item.trim()}).filter(function(item){return item!=\"\"});\n",
       "          // var splits = txt.split(\"\\t\");\n",
       "          var len = splits.length;\n",
       "          var hdrs = $(fixedHeader).find(\".fixed-cell\");\n",
       "          // Add all cells in the selected row as a map to be consumed by the target as needed\n",
       "          var payload = {type:\"select\", targetDivId: \"\" };\n",
       "          for (var i = 0; i < len; i++) {\n",
       "            payload[hdrs[i].innerHTML] = splits[i];\n",
       "          }\n",
       "  \n",
       "          //simple selection highlighting, client adds \"selected\" class\n",
       "          $(this).addClass(\"selected\").siblings().removeClass(\"selected\");\n",
       "          $(document).trigger('pd_event', payload);\n",
       "      });\n",
       "  \n",
       "      $('.df-table-search', tableWrapper).keyup(function() {\n",
       "        var val = '^(?=.*\\\\b' + $.trim($(this).val()).split(/\\s+/).join('\\\\b)(?=.*\\\\b') + ').*$';\n",
       "        var reg = RegExp(val, 'i');\n",
       "        var index = 0;\n",
       "        \n",
       "        rows.each(function(i, e) {\n",
       "          if (!reg.test($(this).text().replace(/\\s+/g, ' '))) {\n",
       "            $(this).attr('class', 'hidden');\n",
       "          }\n",
       "          else {\n",
       "            $(this).attr('class', (++index % 2 == 0 ? 'even' : 'odd'));\n",
       "          }\n",
       "        });\n",
       "        $('.df-table-search-count', tableWrapper).html('Showing ' + index + ' of ' + total + ' rows');\n",
       "      });\n",
       "    });\n",
       "  \n",
       "    $(\".df-table-wrapper td:contains('http://')\").each(function(){var tc = this.textContent; $(this).wrapInner(\"<a target='_blank' href='\" + tc + \"'/>\");});\n",
       "    $(\".df-table-wrapper td:contains('https://')\").each(function(){var tc = this.textContent; $(this).wrapInner(\"<a target='_blank' href='\" + tc + \"'/>\");});\n",
       "  </script>\n",
       "  \n",
       "        </div>\n",
       "    </div>\n",
       "    <div class=\"form-group col-sm-2 rendererOpts\">\n",
       "        \n",
       "        <div><strong>Table View Options</strong></div>\n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_noschema49fe4045\" r=\"f\" type=\"checkbox\" name=\"table_noschema\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_noschema49fe4045\">Hide Schema</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_nosearch49fe4045\" r=\"f\" type=\"checkbox\" name=\"table_nosearch\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_nosearch49fe4045\">Hide Search</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt checkbox checkbox-primary\">\n",
       "                    <input id=\"optioncheckedtable_nocount49fe4045\" r=\"f\" type=\"checkbox\" name=\"table_nocount\"\n",
       "                                >\n",
       "                    <label for=\"optioncheckedtable_nocount49fe4045\">Hide Row Count</label>\n",
       "                    \n",
       "                </div>\n",
       "            \n",
       "            \n",
       "        \n",
       "            \n",
       "            \n",
       "            \n",
       "                <div class=\"rendererOpt\">\n",
       "                    <label class=\"field\">Show Rows:</label>\n",
       "                    <i class=\"fa fa-info-circle\" style=\"color:orange\" data-toggle=\"pd-tooltip\" title=\"Warning: this filter only applies to the sampled data and not the original data set\"></i>\n",
       "                    <select class=\"form-control\" id=\"optionselecttable_showrows49fe4045\" name=\"table_showrows\" r=\"f\" style=\"margin-left: 0px;\">\n",
       "                        \n",
       "                            <option value=\"All\" selected>All</option>\n",
       "                        \n",
       "                            <option value=\"Missing values\" >Missing values</option>\n",
       "                        \n",
       "                            <option value=\"Not missing values\" >Not missing values</option>\n",
       "                        \n",
       "                    </select>\n",
       "                </div>\n",
       "            \n",
       "            \n",
       "            \n",
       "        \n",
       "        \n",
       "    </div>\n",
       "</div>\n",
       "\n",
       "<script>\n",
       "\n",
       "$(\"[id^=optionselect][id$=49fe4045]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).val();\n",
       "    if (thisValue == \"None\"){\n",
       "        thisValue = null\n",
       "    }\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigure49fe4045\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    }\n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML49fe4045');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"20499543AE4446FAA9707357577DE951\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution49fe4045\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution49fe4045\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution49fe4045\").length > 0 ){\n",
       "                    $(\"#execution49fe4045\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone49fe4045 != \"undefined\"){\n",
       "                    onDisplayDone49fe4045();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(pdf,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',org_params='nostore_pixiedust',prefix='49fe4045',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS49fe4045').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(\"[id^=optionchecked][id$=49fe4045]\").change(function(){\n",
       "    var thisOption = $(this).attr('name');\n",
       "    var thisValue = $(this).prop('checked').toString();\n",
       "    var refresh = $(this).attr('r')\n",
       "    var $divId = \"chartFigure49fe4045\"\n",
       "    if (refresh == \"t\"){\n",
       "        $divId = null\n",
       "    } \n",
       "    \n",
       "        \n",
       "    \n",
       "    !\n",
       "function() {\n",
       "    function getTargetNode(){\n",
       "        var n = $('#' + $divId);\n",
       "        if (n.length == 0 ){\n",
       "            n = $('#wrapperHTML49fe4045');\n",
       "        }\n",
       "        return n;\n",
       "    }\n",
       "    cellId = typeof cellId === \"undefined\" ? \"\" : cellId;\n",
       "    var curCell=IPython.notebook.get_cells().filter(function(cell){\n",
       "        return cell.cell_id==\"20499543AE4446FAA9707357577DE951\".replace(\"cellId\",cellId);\n",
       "    });\n",
       "    curCell=curCell.length>0?curCell[0]:null;\n",
       "    console.log(\"curCell\",curCell);\n",
       "    var startWallToWall;\n",
       "    //Resend the display command\n",
       "    var callbacks = {\n",
       "        shell : {\n",
       "            payload : {\n",
       "                set_next_input : function(payload){\n",
       "                    if (curCell){\n",
       "                        curCell._handle_set_next_input(payload);\n",
       "                    }\n",
       "                }\n",
       "            }\n",
       "        },\n",
       "        iopub:{\n",
       "            output:function(msg){\n",
       "                console.log(\"msg\", msg);\n",
       "                if (false){\n",
       "                    //curCell.output_area.clear_output(false, true);\n",
       "                    curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                    return;\n",
       "                }\n",
       "                var msg_type=msg.header.msg_type;\n",
       "                var content = msg.content;\n",
       "                var executionTime = $(\"#execution49fe4045\");\n",
       "                if(msg_type===\"stream\"){\n",
       "                    getTargetNode().html(content.text);\n",
       "                }else if (msg_type===\"display_data\" || msg_type===\"execute_result\"){\n",
       "                    var html=null;\n",
       "                    if (!!content.data[\"text/html\"]){\n",
       "                        html=content.data[\"text/html\"];\n",
       "                    }else if (!!content.data[\"image/png\"]){\n",
       "                        html=html||\"\";\n",
       "                        html+=\"<img src='data:image/png;base64,\" +content.data[\"image/png\"]+\"'></img>\";\n",
       "                    }\n",
       "                                                    \n",
       "                    if (!!content.data[\"application/javascript\"]){\n",
       "                        try {\n",
       "                            eval(content.data[\"application/javascript\"]);\n",
       "                        } catch(err) {\n",
       "                            curCell.output_area.handle_output.apply(curCell.output_area, arguments);\n",
       "                        }                        \n",
       "                        return;\n",
       "                    }\n",
       "                    \n",
       "                    if (html){\n",
       "                        if (pixiedust){\n",
       "                            if (callbacks.options && callbacks.options.nostore_delaysave){\n",
       "                                setTimeout(function(){\n",
       "                                    pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                                }, 1000);\n",
       "                            }else{\n",
       "                                pixiedust.saveOutputInCell(curCell, content, html, msg_type);\n",
       "                            }                         \n",
       "                        }\n",
       "\n",
       "                        try{\n",
       "                            getTargetNode().html(html);\n",
       "                        }catch(e){\n",
       "                            console.log(\"Invalid html output\", e, html);\n",
       "                            getTargetNode().html( \"Invalid html output: \" + e.message + \"<pre>\" \n",
       "                                + html.replace(/>/g,'&gt;').replace(/</g,'&lt;').replace(/\"/g,'&quot;') + \"<pre>\");\n",
       "                        }\n",
       "                    }\n",
       "                }else if (msg_type === \"error\") {\n",
       "                    require(['base/js/utils'], function(utils) {\n",
       "                        var tb = content.traceback;\n",
       "                        console.log(\"tb\",tb);\n",
       "                        if (tb && tb.length>0){\n",
       "                            var data = tb.reduce(function(res, frame){return res+frame+'\\\\n';},\"\");\n",
       "                            console.log(\"data\",data);\n",
       "                            data = utils.fixConsole(data);\n",
       "                            data = utils.fixCarriageReturn(data);\n",
       "                            data = utils.autoLinkUrls(data);\n",
       "                            getTargetNode().html(\"<pre>\" + data +\"</pre>\");\n",
       "                        }\n",
       "                    });\n",
       "                }\n",
       "\n",
       "                //Append profiling info\n",
       "                if (executionTime.length > 0 && $(\"#execution49fe4045\").length == 0 ){\n",
       "                    getTargetNode().append(executionTime);\n",
       "                }else if (startWallToWall && $(\"#execution49fe4045\").length > 0 ){\n",
       "                    $(\"#execution49fe4045\").append($(\"<div/>\").text(\"Wall to Wall time: \" + ( (new Date().getTime() - startWallToWall)/1000 ) + \"s\"));\n",
       "                }\n",
       "\n",
       "                if (typeof onDisplayDone49fe4045 != \"undefined\"){\n",
       "                    onDisplayDone49fe4045();\n",
       "                }\n",
       "                $(document).trigger('pd_event', {type:\"pd_load\", targetNode: getTargetNode()});\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "    \n",
       "    if (IPython && IPython.notebook && IPython.notebook.session && IPython.notebook.session.kernel){\n",
       "        var command = \"display(pdf,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',org_params='nostore_pixiedust',prefix='49fe4045',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')\".replace(\"cellId\",cellId);\n",
       "        function addOptions(options, override=true){\n",
       "            function getStringRep(v) {\n",
       "                return \"'\" + v + \"'\";\n",
       "            }\n",
       "            for (var key in (options||{})){\n",
       "                var value = options[key];\n",
       "                var hasValue = value != null && typeof value !== 'undefined' && value !== '';\n",
       "                var replaceValue = hasValue ? (key+\"=\" + getStringRep(value) ) : \"\";\n",
       "                var pattern = (hasValue?\"\":\",\")+\"\\\\s*\" + key + \"\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "                var rpattern=new RegExp(pattern);\n",
       "                var n = command.search(rpattern);\n",
       "                if ( n >= 0 ){\n",
       "                    if (override){\n",
       "                        command = command.replace(rpattern, replaceValue);\n",
       "                    }\n",
       "                }else if (hasValue){\n",
       "                    var n = command.lastIndexOf(\")\");\n",
       "                    command = [command.slice(0, n), (command[n-1]==\"(\"? \"\":\",\") + replaceValue, command.slice(n)].join('')\n",
       "                }        \n",
       "            }\n",
       "        }\n",
       "        if(typeof cellMetadata != \"undefined\" && cellMetadata.displayParams){\n",
       "            addOptions(cellMetadata.displayParams);\n",
       "        }else if (curCell && curCell._metadata.pixiedust ){\n",
       "            addOptions(curCell._metadata.pixiedust.displayParams || {}, ('True'=='True') );\n",
       "        }\n",
       "        addOptions({});\n",
       "        \n",
       "        \n",
       "        \n",
       "        var o = {};\n",
       "        o[thisOption] = thisValue;\n",
       "        if (refresh != \"t\"){\n",
       "            o[\"nostore_figureOnly\"] = \"true\";\n",
       "        }\n",
       "        addOptions(o);\n",
       "    \n",
       "    \n",
       "        \n",
       "        var pattern = \"\\\\w*\\\\s*=\\\\s*'(\\\\\\\\'|[^'])*'\";\n",
       "        var rpattern=new RegExp(pattern,\"g\");\n",
       "        var n = command.match(rpattern);\n",
       "        \n",
       "        var org_params = {}\n",
       "        callbacks.options = callbacks.options || {};\n",
       "        for (var i=0; i<n.length;i++){\n",
       "            var parts = n[i].split(\"=\")\n",
       "            callbacks.options[parts[0].trim()] = parts[1].trim();\n",
       "            if (parts[0].trim() == \"org_params\"){\n",
       "                var value = parts[1].trim()\n",
       "                var values = value.substring(1,value.length-1).split(\",\");\n",
       "                for (var p in values){\n",
       "                    org_params[values[p].trim()] = true;\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "        var displayParams={}\n",
       "        for (var i = 0; i < n.length; i++){\n",
       "            var parts=n[i].split(\"=\");\n",
       "            var key = parts[0].trim();\n",
       "            var value = parts[1].trim()\n",
       "            if (!key.startsWith(\"nostore_\") && key != \"showchrome\" && key != \"prefix\" && key != \"cell_id\" && key != \"org_params\" && !!!org_params[key]){\n",
       "                displayParams[key] = value.substring(1,value.length-1);\n",
       "            }\n",
       "        }\n",
       "        if(curCell&&curCell.output_area){\n",
       "            curCell._metadata.pixiedust = curCell._metadata.pixiedust || {}\n",
       "            curCell._metadata.pixiedust.displayParams=displayParams\n",
       "            curCell.output_area.outputs=[];\n",
       "            var old_msg_id = curCell.last_msg_id;\n",
       "            if (old_msg_id) {\n",
       "                curCell.kernel.clear_callbacks_for_msg(old_msg_id);\n",
       "            }\n",
       "        }else{\n",
       "            console.log(\"couldn't find the cell\");\n",
       "        }\n",
       "        \n",
       "        $('#wrapperJS49fe4045').html(\"\")\n",
       "        getTargetNode().html('<div style=\"width:100px;height:60px;left:47%;position:relative\"><i class=\"fa fa-circle-o-notch fa-spin\" style=\"font-size:48px\"></i></div>'+\n",
       "        '<div style=\"text-align:center\">Loading your data. Please wait...</div>');\n",
       "        startWallToWall = new Date().getTime();\n",
       "        \n",
       "        console.log(\"Running command2\",command);\n",
       "        IPython.notebook.session.kernel.execute(command, callbacks, {silent:true,store_history:false,stop_on_error:true});\n",
       "    }\n",
       "}\n",
       "()    \n",
       "});\n",
       "\n",
       "\n",
       "$(document).ready(function(){ $('[data-toggle=\"pd-tooltip\"]').tooltip(); });\n",
       "</script>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#TARGET=SPARK\n",
    "display(pdf,nostore_bokeh='false',cell_id='20499543AE4446FAA9707357577DE951',org_params='nostore_pixiedust',prefix='49fe4045',nostore_cw='1098',handlerId='tableView',nostore_vh='1050',nostore_pixiedust='true')"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python (Spark 2.3.3)",
   "language": "python",
   "name": "py-spark233"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
